shrivara/token-bar

Menu bar readout of today's AI usage: spend, tokens, cache hit rate (Claude Code, OpenCode, pi)

Swift

4

166 commits

updated Sep 26, 2026

See the code

See what people are saying

SourceMessageScoreDate

Nifty little macOS toolbar tool to track daily usage

1

Sep 26, 2026

README

token-bar

A macOS menu bar app for local AI usage: spend, input/output tokens, and cache hit rate.

Token Bar panel showing yearly spend, token usage, cache hit rate, a spend graph, and per-model breakdowns

Left-click opens a transient, scrollable dashboard popover with day, week, month, or year totals, a spend graph, model breakdowns, and screenshots. Right-click keeps a native command menu for menu bar metrics, panel display options, color themes, calendar or relative period ranges, and quit.

System follows the macOS appearance. Built-in dark themes include Catppuccin Mocha, Dracula, Gruvbox Dark, Nord, Solarized Dark, and Tokyo Night; light themes include Catppuccin Latte, GitHub Light, Gruvbox Light, and Solarized Light.

An experimental Projects & Sessions panel groups usage across agents by Git root or working directory and shows the highest-usage sessions. Folder icons open projects in Finder, while session names resume the corresponding agent session in Terminal. Enable it in the Experimental section under Show in Panel.

Supported tools

ToolLocal data
Claude Code~/.claude/projects/**/*.jsonl
Codex~/.codex/sessions/**/*.jsonl
OpenCode~/.local/share/opencode/opencode.db
pi~/.pi/agent/sessions/**/*.jsonl

Token Bar watches these sources for changes and refreshes immediately, with a 60-second fallback.

Homebrew

Install

brew install shrivara/tap/token-bar
brew services start token-bar   # start now + at login

Update

brew update
brew upgrade token-bar
brew services restart token-bar

Notes

  • Spend is API-equivalent pricing, not your subscription bill.
  • Rates come from a bundled models.dev snapshot, including mode-specific prices such as -fast. Qualified-provider, namespaced-model, or stripped-qualifier fallback matches are estimates marked ~; unresolved prices contribute $0 and are also marked ~.
  • Everything stays local: no network access or telemetry.

License

MIT

Contributors

shrivara

105 commits

Hasaber8

5 commits

shrivara/token-bar

Menu bar readout of today's AI usage: spend, tokens, cache hit rate (Claude Code, OpenCode, pi)

Swift

4

166 commits

updated Sep 26, 2026

See the code

See what people are saying

SourceMessageScoreDate

Nifty little macOS toolbar tool to track daily usage

1

Sep 26, 2026

README

token-bar

A macOS menu bar app for local AI usage: spend, input/output tokens, and cache hit rate.

Token Bar panel showing yearly spend, token usage, cache hit rate, a spend graph, and per-model breakdowns

Left-click opens a transient, scrollable dashboard popover with day, week, month, or year totals, a spend graph, model breakdowns, and screenshots. Right-click keeps a native command menu for menu bar metrics, panel display options, color themes, calendar or relative period ranges, and quit.

System follows the macOS appearance. Built-in dark themes include Catppuccin Mocha, Dracula, Gruvbox Dark, Nord, Solarized Dark, and Tokyo Night; light themes include Catppuccin Latte, GitHub Light, Gruvbox Light, and Solarized Light.

An experimental Projects & Sessions panel groups usage across agents by Git root or working directory and shows the highest-usage sessions. Folder icons open projects in Finder, while session names resume the corresponding agent session in Terminal. Enable it in the Experimental section under Show in Panel.

Supported tools

ToolLocal data
Claude Code~/.claude/projects/**/*.jsonl
Codex~/.codex/sessions/**/*.jsonl
OpenCode~/.local/share/opencode/opencode.db
pi~/.pi/agent/sessions/**/*.jsonl

Token Bar watches these sources for changes and refreshes immediately, with a 60-second fallback.

Homebrew

Install

brew install shrivara/tap/token-bar
brew services start token-bar   # start now + at login

Update

brew update
brew upgrade token-bar
brew services restart token-bar

Notes

  • Spend is API-equivalent pricing, not your subscription bill.
  • Rates come from a bundled models.dev snapshot, including mode-specific prices such as -fast. Qualified-provider, namespaced-model, or stripped-qualifier fallback matches are estimates marked ~; unresolved prices contribute $0 and are also marked ~.
  • Everything stays local: no network access or telemetry.

License

MIT

Contributors

shrivara

105 commits

Hasaber8

5 commits

Languages

Swift

90.6%

Shell

6.2%

Python

3.2%