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

github.com · 2026-09-26 · by Long Nguyen ·github
Menu bar readout of today's AI usage: spend, tokens, cache hit rate (Claude Code, OpenCode, pi) - shrivara/token-bar

shrivara/token-bar

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

4 stars · 1 forks

README

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

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

Tool Local 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

source

github.com · 1 images · 101 links

Comments (0)

No comments yet