Token Bar

Native macOS 14+ menu-bar utility v0.3.4

Your local AI token usage, one glance away.

Token Bar reads the usage history already on your Mac from Codex, OpenCode, and Claude Code, and totals it in the menu bar. File reads only. No accounts. No usage data upload. Every dollar figure is an estimate only, never a bill.

curl -LO https://github.com/ManuOtel/token-bar/releases/latest/download/TokenBar-latest-macos.dmg
curl -LO https://github.com/ManuOtel/token-bar/releases/latest/download/TokenBar-latest-macos.dmg.sha256
shasum -a 256 -c TokenBar-latest-macos.dmg.sha256

Requires macOS 14 (Sonoma) or later. Unsigned and not notarized: macOS Gatekeeper warns on first launch, which is expected. Right-click Open the app once, then launch normally. Each GitHub release also keeps versioned TokenBar-<version>-macos.zip and .dmg assets with checksums.

Why Token Bar exists

Token usage is scattered across three tools, each with its own history format. Token Bar answers one question without opening three apps: how much have I used, where, and roughly what does it cost? It totals your own on-disk history read-only, stays in the menu bar, and gets out of the way. When a source is missing, you get an empty total plus a short sanitized notice, never a crash and never a raw file path.

Three local sources, one total

  • Codex

    Local session files, read-only. Per-record token counts with file-sequential model attribution; unknown models stay visible under unknown at fallback rates.

  • OpenCode

    Local usage database, read-only. Per-message rows are authoritative; per-session rollups fill uncovered sessions only. Second machines join as an opt-in token-only snapshot (see Sync).

  • Claude Code

    Local project files, read-only. Assistant usage records with cache read and creation folded into input, matching provider semantics.

Sample layout figures: Codex 1,240,000 input, OpenCode 860,500 input, Claude Code 412,300 input. Layout samples, not your usage. Cached tokens are a subset of input and reasoning a subset of output; neither is ever added on top of the total.

Compact first, details on demand

Compact (initial, no scroll)

The 400pt popover opens compact: hero token total for the active source and range, estimated cost, Source chips (All, Codex, OpenCode, Claude with per-source tokens in range) and Range chips (Today, 24H, 7D, 30D, Best, All), a composition ring, a stacked source bar, and a 14-day mini trend. A Details action and a one-line updated-or-notices footer finish it.

Details (expanded, scrollable)

Show less collapses back. Details adds input, output, cached, and reasoning cards (cached reads subset of input, reasoning subset of output), a composition card that splits the total into input vs output only, an always-visible source breakdown (empty sources stay listed as no records), top-5 model bars, the full 14-day trend with date range, sanitized notices, and the OpenCode combined total with local vs remote sub-lines when both are present.

Filters, the refresh button with loading state, empty-range shortcuts (jump to All sources or Lifetime), the best-month key, and the last-updated line work identically in both modes.

Pricing estimates, honestly labelled

Every dollar figure is labelled an estimate from a rate table, not a bill. Subscription use is not an API invoice. The built-in static table works fully offline. One strictly opt-in refresh fetches public model pricing metadata and narrows drift for listed models; without it the app never touches the network. Refreshed runs name their rate basis (dynamic catalog, cached catalog, or static estimates with host, model count, and age). Unknown models never price at zero: they use the fallback rate and stay visible in the report.

Second Mac? Sync is opt-in.

Remote merge ships disabled. Two paths, same totals:

  1. Manual copy (offline, no network). Export a token-only snapshot on the other machine and copy it over by whatever means you already operate. No fetch involved.
  2. Auto pull (opt-in). Enable remote sync in Settings and enter your own host alias plus the remote snapshot path or exporter command, with an optional origin label. The app pulls over your existing SSH setup at startup, on an interval, and on Sync Now. No passwords or keys are stored, nothing is guessed, prompts are never shown, and no usage data is ever sent (downloads only). Each pull validates before replacing the local cache and keeps the last good cache on any failure.

Install in two minutes

  1. Download and verify. Grab the DMG above and check its SHA-256 with the commands shown. The ZIP pair verifies the same way.
  2. Move to Applications. DMG: open it, drag TokenBar.app onto Applications. ZIP: unzip, drag TokenBar.app to Applications.
  3. Open once past Gatekeeper. Releases are unsigned and not notarized, so macOS Gatekeeper shows a warning on first launch. That is expected: right-click Open the app once, then launch normally.
  4. Read your usage. First launch scans local history only and shows the cached report instantly on later launches while a background refresh recomputes. Toggle launch-at-login from the Settings gear when you want it in every session.

What you get after download

Local-first boundary

Source and history

Token Bar is open source. Read the code, the release changelog for Token Bar, and the GitHub repository ManuOtel/token-bar. Current page release: v0.3.4.