Token Tracker: monitor AI token usage and cost with a local dashboard and desktop companion
Token Tracker is a free, open-source, local-first dashboard that automatically tracks and monitors token usage and cost across 27 AI coding tools — including Claude Code, OpenAI Codex, Cursor, and Gemini CLI. A desktop pet reacts to real token activity, four desktop widgets keep usage visible, and achievements turn coding history into progress. Native macOS and Windows apps sit on top of accurate cross-provider deduplication. Token counts only — never prompts or conversations.
Install in one command
npx tokentracker-cli
On first run, the CLI auto-detects installed AI coding tools, installs the appropriate hooks
(SessionEnd hooks, TOML notify arrays, plugins, or passive log readers depending on the tool), and
starts a local dashboard at http://localhost:7680. macOS users can also install the
native menu bar app via brew install --cask mm7894215/tokentracker/tokentracker.
What you get after installing
Token Tracker runs entirely on your machine. After npx tokentracker-cli, a local
dashboard at http://localhost:7680 exposes the following views — none of them require an
account, and your data never leaves your device unless you opt into cloud sync.
- Desktop pet — a pixel companion that reacts to real token burn, streaks, and rest.
- Four desktop widgets — usage, activity heatmap, top models, and limits at a glance.
- Achievements — unlock milestones from local and optional account-wide activity.
- Unified usage dashboard — input, output, cached, and cache-creation tokens across 27 AI coding tools.
- Cost analysis — per-model pricing across 2,200+ models with an offline snapshot.
- Usage limits view — live rate-limit and subscription status for Claude, Codex, Cursor, Gemini, Kiro, and Antigravity.
- Project attribution — see which repository or workspace consumed which tokens.
- Activity heatmap & trend charts — GitHub-style contribution calendar plus day / week / month / total / custom-range charts.
- Skills browser — discover and install agent skills from the open ecosystem.
- Native desktop apps — a macOS menu bar app and Windows system tray app.
Privacy by design: token counts only, never prompts or conversation content. Local-first; cloud sync is optional and powers only the public leaderboard.
Supported AI coding tools (27)
Use Token Tracker as a Claude Code token tracker, Codex token tracker, Cursor token tracker, Gemini token tracker, OpenCode token tracker, or GitHub Copilot token tracker — one dashboard covers all 27 tools below.
- Claude Code — Anthropic's official coding agent CLI; integrated via SessionEnd hook.
- Codex CLI — OpenAI Codex command-line agent; integrated via TOML notify array in
~/.codex/config.toml. - Cursor — editor usage from local state and provider data.
- Gemini CLI — Google Gemini coding CLI; SessionEnd hook integration.
- Antigravity — passive transcript reader.
- Kiro — SQLite and JSONL readers.
- OpenCode — open-source coding agent; plugin + SQLite audit.
- OpenClaw — session plugin integration.
- Every Code — Codex-compatible TOML notify hook.
- Hermes Agent — SQLite sessions table at
~/.hermes/state.db. - GitHub Copilot — App, CLI, and Chat usage readers.
- Kimi Code — passive
wire.jsonlreader. - CodeBuddy (Tencent) — Claude-Code fork; SessionEnd hook in
~/.codebuddy/settings.json. - WorkBuddy (Tencent) — SessionEnd hook and passive session reader.
- Grok Build — hook and passive cumulative usage reader.
- oh-my-pi — passive JSONL session reader.
- pi — passive JSONL session reader.
- Craft Agents — passive session reader.
- Kilo CLI — passive SQLite reader.
- Kilo Code — passive editor task reader.
- Roo Code — passive editor task reader.
- Zed Agent — passive SQLite reader.
- Goose — passive SQLite reader.
- Droid (Factory) — passive cumulative session reader.
- Mimo Code — passive SQLite reader that excludes mirrored Claude history.
- ZCode — passive SQLite reader for Z.ai-native turns.
- AnythingLLM Desktop — passive per-message token metrics reader.
Who should use Token Tracker
Token Tracker is built for developers, founders, and engineering teams who rely on multiple AI coding assistants and need a single place to understand token consumption. Instead of checking each tool separately, you can compare usage trends by model, project, and time window in one dashboard.
Teams use Token Tracker to answer practical questions: which model is consuming the most budget, whether a new workflow increases cost, how a Pro plan is tracking against rate limits, and how token usage shifts over days or weeks. This makes budgeting, optimization, and reporting easier without introducing heavy tracking overhead.
How it works
Each supported tool emits usage data when a session ends. Token Tracker's parser
(src/lib/rollout.js) normalizes provider-specific log formats into a unified schema: half-hour
UTC buckets keyed by (source, model, hour_start). Aggregated buckets are written to
queue.jsonl and served from a local HTTP API on port 7680. The React dashboard reads
from those endpoints; cloud sync (optional) uploads bucketed counts to InsForge for the public
leaderboard.
Frequently asked questions
How do I install Token Tracker?
Run npx tokentracker-cli. The CLI auto-detects your AI coding tools, installs hooks, and opens the dashboard.
Which AI coding tools does Token Tracker support?
Token Tracker supports 27 tools: Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Craft Agents, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, and AnythingLLM Desktop.
Is Token Tracker free and open source?
Yes. Source on GitHub at github.com/mm7894215/TokenTracker; npm package tokentracker-cli.
Does Token Tracker collect my prompts or conversations?
No. Only token counts, model names, timestamps, and project attribution are recorded. Prompts and completions are never read or uploaded.
What does Token Tracker track?
Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces rate limits and subscription status for Claude Pro, ChatGPT plans, Cursor, Gemini, Kiro, and Antigravity.
How do I monitor AI token usage and cost across tools?
Token Tracker is an AI token usage and cost tracker: install it with npx tokentracker-cli, and it monitors token consumption and spend across all 27 tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking.
Does Token Tracker work offline?
Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happen on your machine. Cloud sync is optional and powers only the public leaderboard.
Resources
- Homepage and install instructions
- AI coding token usage leaderboard — Claude, Codex, Cursor
- Claude IP check — exit IP reputation & risk (纯净度) score
- npm: tokentracker-cli
- GitHub: mm7894215/TokenTracker
- Report an issue
Note: The usage dashboard, rate-limit panel, project attribution, skills browser,
and widget previews are part of the local app at http://localhost:7680 after install —
they are not standalone public URLs.