A minimal macOS menu bar app showing today's AI usage: spend, tokens in/out, and cache hit rate.
The numbers roll odometer-style whenever new usage lands. Left-click the menu bar item for a panel with the period's totals, a spend graph, and a per-tool, per-model breakdown; the D / W / M / Y buttons switch between day, week, month, and year. The camera button copies a clean Retina PNG to the clipboard as both an image and a pasteable file. Right-click (or Control-click) for view options — toggle the spend graph, provider icons, and full vs. short model names — and to quit.
| Tool | Source | Cost |
|---|---|---|
~/.claude/projects/**/*.jsonl
Codex~/.codex/sessions/**/*.jsonl
OpenCode~/.local/share/opencode/opencode.db
pi~/.pi/agent/sessions/**/*.jsonl
Updates are instant: file-system events fire the moment a session writes new usage (coalesced to at most about one refresh per second while streaming), with a 60s timer as backstop and for the midnight rollover. Tools with no activity today are hidden from the panel.
brew install shrivara/tap/token-bar
brew services start token-bar # start now + at login
Requires macOS 14+ and the Xcode Command Line Tools.
git clone https://github.com/shrivara/token-bar
cd token-bar
./build.sh
open TokenBar.app
Add TokenBar.app
to System Settings → Login Items to start it at login.
token-bar --print # or ./TokenBar.app/Contents/MacOS/TokenBar --print
Prints today's per-model breakdown and totals to stdout, then exits.
- Spend is API-equivalent pricing. If you're on a subscription plan (e.g. Claude Max), the dollar figure shows what the usage
wouldcost via the API, not what you're billed. - API-equivalent pricing comes from an offline snapshot of
models.dev, bundled with the app under its MIT license. Prices are looked up by provider and model for every message, including cache and reasoning tokens. Qualified provider variants fall back to their base provider: for example,
openai-codex
falls back to the matchingopenai
model price. Because this is an approximation, it remains marked~
. A model that isn't in the catalog (or lacks a complete price) contributes $0 and is marked~
in the panel — the tool's own recorded cost is not trusted, and there is no rate guessing. - Everything is read locally at runtime. No network access, no telemetry.
The Daily pricing release GitHub Actions workflow checks models.dev once a day. If the normalized catalog changed, it bumps the patch version, runs the tests, builds the app, and commits and tags the new version. It then triggers the Homebrew tap to update its formula and build bottles; the tap's own daily check is a fallback. If nothing changed, no release is created.
To update manually, run ./Scripts/update-model-pricing.sh
to regenerate the checked-in snapshot and ./Scripts/bump-patch-version.sh
to bump the app version. Normal builds do not fetch the network.
MIT