The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Tokmeter — AI Agent Usage & Cost listing page.
Every AI coding agent you run, on one ledger.
Tokmeter reads the session files your agents already write to disk and turns them into token and cost totals by project, model, provider, and day — across Claude Code, Codex, Gemini CLI, Cursor, and a dozen more. No API keys, no telemetry, no account. Your data never leaves the machine.
Every agent bills you separately and shows you its own slice. Claude Code knows what Claude Code cost. Codex knows what Codex cost. Nothing knows what today cost, or which project is quietly burning the most, or whether the model you switched to is actually cheaper for the work you do.
Tokmeter answers that from data already on your disk. It parses each agent's local session logs, prices them against a live model catalog, and keeps an append-only daily ledger so history survives even after the agents rotate their own logs away.
![]() | ![]() |
| CLI — usage by project, model and provider | Digest — a weekly report card |
macOS menubar — today's tokens and cost, always visible
There is also a terminal UI (tokmeter-tui), a local web dashboard, a statusline for Claude Code, and an MCP server so an agent can query its own spending.
Requires Node.js 18+. Reading session files needs no provider credentials; pricing lookups fetch a public catalog, and --light skips them entirely.
| Package | Contents |
|---|---|
@sriinnu/tokmeter | Core API, CLI, and terminal UI |
@sriinnu/tokmeter-mcp | MCP server, daemon, statusline, and live terminal UI |
packages/core, packages/cli, and packages/tui are private workspace packages bundled into @sriinnu/tokmeter. packages/web is a separate private workspace app run from source.
Claude Code and Codex are the primary validation targets. See provider compatibility for the other parsers and their known limits.
Filters include --project, --claude, --codex, --week, --month, and --since YYYY-MM-DD --until YYYY-MM-DD. Use --json for machine-readable output and --light for token-only reports.
The root export provides the core API. Convenience query helpers use the /cli subpath.
Reuse one core scan when querying several breakdowns. See integration guidance, core API usage, and SKILL.md for agent-facing integration instructions.
The daemon uses local HTTP port 9877 for queries and WebSocket port 9876 for live registration. The macOS app, statusline, and MCP server consume its shared state. Daemon commands belong to @sriinnu/tokmeter-mcp; install it for these surfaces.
MCP tools use the tokmeter_ prefix and cover usage queries, comparisons, forecasts, export, and confirmed cleanup/restore operations. See the MCP reference for names, configuration, and programmatic exports.
tokmeter-mcp editors lists installer targets. tokmeter-mcp install-mcp and tokmeter-mcp install-statusline write editor configuration; inspect the generated settings for your editor. See architecture for registration, authentication, refresh, storage, and daemon lifecycle details.
The terminal UI supports overview, model, daily, and statistics views. See its keys and commands.
Run the web workspace from a source checkout:
Open http://localhost:3000. See web setup and data sources.
Release builds target Apple silicon and macOS 14+. Node.js 18+ with npx is also required for the local daemon.
Install @sriinnu/tokmeter-mcp, run tokmeter-mcp daemon start, then open TokmeterBar from /Applications. Download the app from GitHub Releases.
The popup gives today's tokens and estimated API cost equal prominence, with models and projects below. Chart hover cards show exact daily tokens and cost. Usage details expands lifetime totals, trends, and signals. Six themes are selectable: Terminal, Paper, Prism, Lagoon, Carbon, and Glass. The Hub provides larger breakdowns and settings. Settings → Open web dashboard starts its local server on demand; Stop web dashboard or quitting the app stops it.
See macOS build and runtime details, first-use checks, and popover validation. The completion tracker records remaining fresh-machine, reliability, update, accounting, accessibility, and trial gates.
The synthetic walkthrough documents how the example images were generated; it is not a capture of a current local candidate.
AGPL-3.0-only. See licensing notes for what that means if you embed Tokmeter in another product.