[Resource]: TokenTracker
Display Name
TokenTracker
Category
Tooling
Sub-Category
Tooling: Usage Monitors
Primary Link
https://github.com/mm7894215/TokenTracker
Author Name
mm7894215
Author Link
https://github.com/mm7894215
License
MIT
Other License
No response
Description
Local-first menu bar app and CLI that tracks token usage and cost across 20+ AI coding tools, including Claude Code, Codex, Cursor, Gemini, and Copilot. Parses local log files on disk with no API keys, no network telemetry, and no access to prompts or message content. Distributed as a Node CLI (npm) and a native macOS menu bar app (Homebrew tap + DMG).
Validate Claims
Install the CLI with npm install -g tokentracker, then run a few Claude Code sessions. Run tokentracker sync followed by tokentracker serve and open http://localhost:7680 to see per-model token usage and cost broken down by hour, with Claude Code, Codex, Cursor, and other detected tools listed separately. No login, no API keys, no network traffic to TokenTracker servers — verify with lsof -i -P -n | grep tokentracker after sync (only the local :7680 listener is expected).
Network behaviour: TokenTracker makes NO outbound network calls during sync or serve. It only reads local log files on disk (e.g. ~/.claude/projects/, ~/.codex/sessions/, ~/.gemini/). The web dashboard binds to 127.0.0.1:7680. The optional tokentracker login (account leaderboard) uses InsForge OAuth and is fully opt-in.
Specific Task(s)
Have Claude Code attribute a session's token usage and cost correctly without any outbound network calls from TokenTracker.
- In any small repo, run a short Claude Code session (e.g. ask it to explain one function).
- In a terminal:
tokentracker sync && tokentracker serve - Open http://localhost:7680 and confirm a row for Claude Code with non-zero token counts and a cost that matches Anthropic's billing dashboard for the same period.
- Optionally:
lsof -i -P -n | grep tokentracker— only the local :7680 listener should appear, no outbound connections.
Specific Prompt(s)
Suggested prompt to Claude Code while testing:
Explain what the
parseClaudeIncrementalfunction in src/lib/rollout.js does and how it deduplicates messages.
Then, in a separate terminal, run:
npm install -g tokentracker
tokentracker sync
tokentracker serve --no-sync
Open http://localhost:7680. The Claude Code row should reflect the tokens used by the prompt above. Cross-check against claude --usage or Anthropic's billing dashboard.
Uninstall: npm uninstall -g tokentracker (CLI) or drag TokenTracker.app to Trash + delete ~/.tokentracker/ (macOS app).
Additional Comments
- Repo: https://github.com/mm7894215/TokenTracker
- Website: https://www.tokentracker.cc
- License: MIT (LICENSE in repo root)
- First public commit: well over one week old; latest release v0.24.8 on 2026-05-26
- Source of truth for supported providers:
parse*Incrementalfunctions insrc/lib/rollout.js— currently 20+ AI coding tools including Claude Code, Codex / Every Code, Cursor, Gemini CLI, GitHub Copilot, Kiro, OpenCode, Goose, Zed, Antigravity, Kimi, Grok, Droid (Factory CLI), OpenClaw, OMP, PI, Craft, Codebuddy, RooCode, Kilocode, Hermes - Featured in 阮一峰科技爱好者周刊 #393 (2026-05-23)
- Network policy: sync/serve make NO outbound network calls. The optional
tokentracker loginfeature (account-level leaderboard) is fully opt-in and uses InsForge OAuth. - Auto-update: standard channels only — npm (
npm install -g tokentracker@latestis user-initiated) and Homebrew tap (brew upgrade --cask tokentracker). The macOS app does NOT auto-download or auto-execute updates in the background. - Permissions: does NOT require
--dangerously-skip-permissions. Reads its own log files in known locations under~/.
Recommendation Checklist
- [x] I have checked that this resource hasn't already been submitted
- [x] It has been over one week since the first public commit to the repo I am recommending
- [x] All provided links are working and publicly accessible
- [x] I do NOT have any other open issues in this repository
- [x] I am primarily composed of human-y stuff and not electrical circuits
Factual update for reviewers: TokenTracker is now at v0.79.6 and supports 27 AI coding tools. The core remains a local token-usage and cost dashboard; the current release also includes native macOS/Windows apps, 4 desktop widgets, achievements, and an optional desktop pet. The privacy model is unchanged: sync/serve read local usage logs and never read prompts or message content. Current release: https://github.com/mm7894215/TokenTracker/releases/tag/v0.79.6