DEV Community

E Daugherty
E Daugherty

Posted on

Metering a Free Tier by Words Instead of Days in a Mac App

On November 11, DraftKey shipped two releases about six hours apart. Version 0.1.61 made the app free to try with 2,000 words of writing help per Mac. Version 0.1.62 cut that to 500 words, added a warning when about 100 words are left, and changed what the app looks like once the allowance runs out. Both release notes are public, and they are the source for every DraftKey detail in this post.

We build DraftKey, a Mac app for Tab autocomplete and rewrites you review before they are inserted. This is not a pricing post. It is about the engineering decisions hiding behind a sentence like "every Mac gets 500 free words," because almost none of them are obvious until you have to ship one.

Why words, not days

The default trial for desktop software is a clock: 7 or 14 days, then a paywall. A clock is easy to build and easy to explain. It is also a poor match for a tool you use in short bursts. Someone installs a writing helper on a Monday, uses it twice, gets busy, and comes back on day 15 to a locked app they never really tried.

A usage allowance is consumed only when the feature does work. Nobody loses their trial to a vacation. The tradeoff is that you now have to define the unit precisely, count it reliably, and show the count somewhere people will see it. A day counts itself. A word does not.

Decide what is metered, and fence off what is not

The first design question is scope. DraftKey's notes list what the allowance covers: suggestions, Writing tools, and slash commands. They are just as explicit about what it does not cover: keyboard sounds and clipboard history "stay free and are never counted."

That second list matters more than it looks. If a feature is promised as free, it should be impossible for it to touch the meter, not merely unlikely. In practice that means the counting call lives in one place, on the path where model output is actually delivered, rather than being sprinkled through the app. Features that never reach that path cannot decrement the allowance by accident.

You also have to pick a counting rule and stick to it. Words typed by the user, words suggested, or words actually accepted are three different numbers. Whatever you pick, make it the one a user would guess if you asked them, because the count is going to be displayed and they will compare it with their own sense of how much they used.

Device identity on macOS, without shipping a hardware ID

"The free word count belongs to your Mac" sounds simple. It requires a stable answer to "which Mac is this?" that survives an app reinstall, because a counter that resets when someone drags the app to the Trash and back is not much of a limit.

macOS gives you a few options, each with costs:

  • A random UUID you generate and store. UserDefaults is wiped by deleting the app's preferences. The Keychain survives reinstalls but can be removed by the user. Either is fine for convenience and weak as an allowance anchor.
  • A hardware-derived identifier. IOKit exposes a platform UUID on the IOPlatformExpertDevice registry entry (the IOPlatformUUID property), which stays the same across reinstalls of your app. It is also a persistent identifier for that machine, which is exactly why it should never leave the Mac in raw form.
  • An account. Requiring sign-in solves identity cleanly and adds friction to the first minute, which is the minute a free tier exists to protect.

Whatever source you use, send a derived value instead of the raw one. A keyed hash, such as an HMAC from Apple's CryptoKit with a key specific to your app, gives your server a stable identifier for the Mac without handing it a hardware ID that could be matched against other services. DraftKey's notes describe this part in plain terms: it checks the count online "with a hashed identifier for your Mac and a number of words, never your writing." That is the whole payload a meter like this needs.

Send counts, not content

A writing app has an obvious temptation here: the text is right there, so why not send it and count server-side? Because it turns a billing feature into a data-collection feature. The server only needs two facts to enforce an allowance: who is asking (the hashed device value) and how many units were used. Keep the request that small and the privacy story of the meter is easy to state and easy to verify by watching the traffic.

Batching helps too. Reporting after every accepted suggestion makes the meter chatty and fragile on bad networks. Reporting accumulated counts periodically, with the server holding the authoritative total, keeps the request rate low. You will still have to decide what happens offline: whether to allow a small local grace amount or pause until the count can be confirmed. Neither choice is wrong, but it should be a decision, not whatever the networking code happens to do on timeout.

Warn before zero

For most metered products, running out is an annoyance. For an autocomplete tool it can look like a malfunction. Suggestions simply stop appearing, in the middle of a sentence, and the most reasonable conclusion a user can draw is that the app broke.

0.1.62 addresses that from two directions. DraftKey gives a heads-up when about 100 free words are left, "so writing help never stops mid-sentence without warning." And once the words are gone, Autocomplete and Writing tools "say they are paused, with a lock, once the free words are gone, instead of looking broken."

That second change is worth copying even if you never meter anything. Every state a feature can be in should be visibly distinct: on, off by choice, unavailable because of a permission, unavailable because of the plan. If two of those look the same, your support inbox becomes the place where users find out which one they hit.

Put the meter where the decision happens

The same release gave the free plan its own card on Home: how many words are left, what stays free forever, what a license adds, and a single button to buy it. License activation moved to that card as well. Home and the menu bar both show the remaining count.

The engineering point is co-location. The number, the explanation of what it limits, and the way to remove the limit belong in one place. Splitting them across Settings, an About pane, and an email after purchase means users have to reassemble the model in their heads, and many will not.

Assume the number will change

The allowance went from 2,000 to 500 words between two releases on the same day. Whatever your first number is, plan for it to move. That suggests a few concrete things:

  1. Keep the allowance value out of scattered UI strings, so a change does not mean hunting for every place "2,000" was typed.
  2. Decide up front how a change applies to people who already started: whether the server stores words used or words remaining determines whether a reduction can push someone straight to zero.
  3. Write the release note in plain numbers. "The free allowance is 500 words of writing help per Mac, down from 2,000" is the kind of sentence that prevents a confused support thread.

What I would carry into any usage-metered desktop app

  • Meter only the expensive path, and make free features structurally unable to touch the counter.
  • Pick a unit users would count the same way you do.
  • Anchor the allowance to the device with a derived, keyed value, never a raw hardware identifier.
  • Send a count and an identifier, nothing else.
  • Warn before the limit, and make "paused by plan" look different from "broken."
  • Keep the count, the explanation, and the upgrade path together.

Where DraftKey fits

Disclosure: I build DraftKey. It needs an Apple Silicon Mac on macOS 14 or later, and its writing features need at least 8 GB of memory and a separate writing-model download of about 1.12 GB, with at least 2.2 GB of free space. Each Mac gets 500 free words of writing help, and a license is $4.99 once for up to three Macs. It works in compatible text fields, not every app. You can see how it works here.

If you have shipped a usage-based trial in a desktop app, what unit did you meter, and how did you handle the moment someone went offline mid-allowance?

Sources

Top comments (0)