Requires Node.js 18+. Reading session files needs no provider credentials;
pricing lookups fetch a public catalog, and --light skips them.
Try it without installing
npx -y @sriinnu/tokmeter --today
CLI + TUI
npm install -g @sriinnu/tokmeter
tokmeter --today
tokmeter-tui
Daemon, MCP server, statusline
These live in @sriinnu/tokmeter-mcp:
npm install -g @sriinnu/tokmeter-mcp
tokmeter-mcp daemon start # warm aggregation daemon (HTTP 9877, WS 9876)
tokmeter-mcp serve # MCP server over stdio
tokmeter-mcp statusline # one statusline tick
MCP client config (stdio):
{ "command": "npx", "args": ["-y", "@sriinnu/tokmeter-mcp", "serve"] }
For Claude Code, register it with its CLI instead of editing a file:
claude mcp add tokmeter --scope user -- npx -y @sriinnu/tokmeter-mcp serve
Since 1.15.0, tokmeter-mcp install-mcp runs claude mcp add for you. Older
versions wrote the entry to ~/.claude/settings.json, which Claude Code doesn’t
load MCP servers from; if you set it up that way, delete that entry.
The default command launches a terminal UI, so the MCP entry point is the
serve subcommand. On macOS, tokmeter-mcp daemon install-agent installs a
launchd LaunchAgent so the daemon auto-starts at login and respawns on crash.
macOS menubar app
Apple silicon, macOS 14+.
brew install --cask sriinnu/homebrew-tap/tokmeterbar
Or download TokmeterBar-<version>.zip from
GitHub Releases and move it to
/Applications. The app auto-updates via Sparkle from a signed appcast.
Something wrong or out of date? This page is generated from its source on GitHub.