{"slug": "nifty-little-macos-toolbar-tool-to-track-daily-usage", "title": "Nifty little macOS toolbar tool to track daily usage", "summary": "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+.", "body_md": "A minimal macOS menu bar app showing today's AI usage: spend, tokens in/out, and cache hit rate.\n\nThe 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.\n\n| Tool | Source | Cost |\n|---|---|---|\n|\n\n`~/.claude/projects/**/*.jsonl`\n\n[Codex](https://developers.openai.com/codex/)`~/.codex/sessions/**/*.jsonl`\n\n[OpenCode](https://opencode.ai)`~/.local/share/opencode/opencode.db`\n\n[pi](https://github.com/badlogic/pi-mono)`~/.pi/agent/sessions/**/*.jsonl`\n\nUpdates 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.\n\n```\nbrew install shrivara/tap/token-bar\nbrew services start token-bar   # start now + at login\n```\n\nRequires macOS 14+ and the Xcode Command Line Tools.\n\n```\ngit clone https://github.com/shrivara/token-bar\ncd token-bar\n./build.sh\nopen TokenBar.app\n```\n\nAdd `TokenBar.app`\n\nto System Settings → Login Items to start it at login.\n\n```\ntoken-bar --print   # or ./TokenBar.app/Contents/MacOS/TokenBar --print\n```\n\nPrints today's per-model breakdown and totals to stdout, then exits.\n\n- Spend is API-equivalent pricing. If you're on a subscription plan (e.g. Claude Max), the dollar figure shows what the usage\n*would*cost via the API, not what you're billed. - API-equivalent pricing comes from an offline snapshot of\n[models.dev](https://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`\n\nfalls back to the matching`openai`\n\nmodel price. Because this is an approximation, it remains marked`~`\n\n. A model that isn't in the catalog (or lacks a complete price) contributes $0 and is marked`~`\n\nin 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.\n\nThe **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.\n\nTo update manually, run `./Scripts/update-model-pricing.sh`\n\nto regenerate the checked-in snapshot and `./Scripts/bump-patch-version.sh`\n\nto bump the app version. Normal builds do not fetch the network.\n\nMIT", "url": "https://wpnews.pro/news/nifty-little-macos-toolbar-tool-to-track-daily-usage", "canonical_source": "https://github.com/shrivara/token-bar", "published_at": "2026-08-04 07:09:19+00:00", "updated_at": "2026-08-04 07:22:36.938245+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["Shrivara", "TokenBar", "Claude", "Codex", "OpenCode", "pi", "models.dev", "Homebrew"], "alternates": {"html": "https://wpnews.pro/news/nifty-little-macos-toolbar-tool-to-track-daily-usage", "markdown": "https://wpnews.pro/news/nifty-little-macos-toolbar-tool-to-track-daily-usage.md", "text": "https://wpnews.pro/news/nifty-little-macos-toolbar-tool-to-track-daily-usage.txt", "jsonld": "https://wpnews.pro/news/nifty-little-macos-toolbar-tool-to-track-daily-usage.jsonld"}}