cd /news/ai-tools/nifty-little-macos-toolbar-tool-to-t… · home topics ai-tools article
[ARTICLE · art-85699] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Nifty little macOS toolbar tool to track daily usage

Shrivara has released TokenBar, a free macOS menu bar app that tracks daily AI usage across Claude, Codex, OpenCode, and pi, displaying spend, tokens, and cache hit rates with odometer-style updates. The app, available via Homebrew or GitHub, reads local session files, uses API-equivalent pricing from an offline models.dev snapshot, and requires macOS 14+.

read2 min views1 publishedAug 4, 2026
Nifty little macOS toolbar tool to track daily usage
Image: source

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

── more in #ai-tools 4 stories · sorted by recency
── more on @shrivara 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/nifty-little-macos-t…] indexed:0 read:2min 2026-08-04 ·