TokenTracker is a local-first AI token usage and cost tracking tool for developers who use multiple AI coding tools, helping to tally token consumption and costs for each tool. The project is released as an open-source repository and provides a command-line tool and a native desktop app.
Purpose and positioning TokenTracker is used to track the token usage and cost of AI coding tools and aggregate the data into a local dashboard. It emphasizes local operation: it parses local logs, requires no cloud account or API key, and does not read prompts, code, or model responses—it only processes usage metrics such as token counts, timestamps, and model names.
Main capabilities
- Supports 48 AI tools, including Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, GitHub Copilot, Kimi Code, CodeBuddy, Grok Build, Cline, LM Studio, DeepSeek Harness, TRAE, and more.
- Local dashboard: shows usage trends, breakdown by model, cost analysis, GitHub-style activity heatmap, and project attribution.
- Zero configuration: on first run it automatically installs hooks and syncs data, then at http://localhost:7680 opens the dashboard.
- Native desktop apps: macOS menu bar app (with widgets), Windows system tray app, Linux tray app (AppImage, .deb, .rpm).
- Desktop pet: a pixel companion that changes based on real coding activity—coding while working, celebrating during streaks, sleeping during breaks; supports importing community pets from codex-pets.net.
- 4 desktop widgets: usage, activity heatmap, top models, usage limits.
- 15 achievement tracks: turn daily usage, streaks, tools, models, and milestones into badges.
- Real-time usage limits: covers quota windows for Claude, Codex, Cursor, Gemini, Kimi, Kiro, Grok, Copilot, Antigravity, ZCode, OpenCode Go, Qoder, Command Code, Ark Coding Plan, Ark Agent Plan, Devin, and more, and uses the last cache when the local provider app is temporarily closed.
- Custom credit gateway: connect a gateway that supports a per-model usage API in the local dashboard settings to display daily, weekly, and monthly credit usage.
- Service status page: shows real-time operational and incident status for 8 official provider status pages.
- Cost engine: prices 2,200+ models via LiteLLM (automatically refreshed daily), with custom overrides for Kiro, Cursor Composer, Kimi, CodeBuddy hy3, and others; with a 24-hour disk cache and offline snapshot, it can provide USD costs even without a network. Models without published vendor pricing only have tokens counted, and cost is shown as $0.
- Optional leaderboard: compare with other developers; login is required to participate.
- Optional cross-device account view: cloud sync merges usage from multiple machines; off by default.
- Optional Skills tab: browse 250+ public skills from anthropics/skills, ComposioHQ/awesome-claude-skills, skills.sh, and custom GitHub repositories, and sync them to Claude, Codex, Grok, Antigravity, Gemini, OpenCode, Hermes, with per-target toggles and one-click undo.
How to use Requires Node.js 20+. The CLI is available on macOS, LiRuns on nux and Windows; native desktop apps provide a macOS menu bar version, a Windows system tray version, and a Linux AppImage/tray version. On first run, tokentracker (or tokentracker init) installs hooks, syncs data, and opens the local dashboard. Use tokentracker status to view the status of each integration. On macOS it can be installed via Homebrew; Linux offers three package types: AppImage, .deb, and .rpm.
Integration methods
- Hook-based tools (Claude Code, Codex, AStudio, Gemini, Every Code, CodeBuddy, WorkBuddy, Grok Build): write a SessionEnd hook or a TOML notify entry.
- Plugin-based tools (OpenCode, OpenClaw): the plugin ships with the npm package and is linked and enabled via the tool's own CLI.
- oh-my-pi: passively scans session files and, once detected, writes a managed notify extension.
- OmO, Cline: only passively scan session files; no hooks or plugins are installed.
- Passive-read tools (Cursor, Kiro, Hermes, Kimi Code, Copilot, Grok Build, pi, Craft Agents, Reasonix, Muse Code, Kilo CLI, Kilo Code, Roo Code, Antigravity, Zed Agent, Goose, Droid, Mimo Code, DuMate, ZCode, Qoder, LM Studio, Unsloth Studio, OpenSquilla, AnythingLLM Desktop, Devin CLI, MiniMax Code, DeepAI Code, Claude Science, DeepSeek Harness, Cline): nothing is installed into these tools; only the SQLite databases, JSONL, OTEL exports, or session logs they already generate are read.
How it works AI CLI tools generate logs during normal use; lightweight hooks detect changes and trigger a sync (Cursor uses an API instead of hooks); Token counts are parsed locally; prompts, responses, and code are not saved or uploaded; data is aggregated into 30-minute UTC buckets; the dashboard, menu bar app, and widgets read the same local snapshot.
Use cases Suitable for developers and teams who need to understand the token consumption and cost of multiple AI coding tools, and for users who want to keep usage data locally without exposing code content.
Limitations and notes
- Local features are free and open source; the optional TokenTracker Cloud is an officially hosted cross-device analytics service, with materials mentioning pricing of $4.99 per month or $39.99 per year (before tax); the self-hosted software is free, and the full installation is currently a technical preview.
- Grok Build's current local telemetry only exposes a cumulative totalTokens, with no stable prompt/output/cache breakdown, so cost is an estimate.
- Models without published vendor pricing only have their tokens counted, and cost is shown as $0.
- On Linux, the GNOME tray icon requires the AppIndicator extension; the .deb for Debian 12 cannot be installed due to dependency issues, so AppImage is recommended.
- Offline usage transfer: you can export JSON in the local dashboard settings, import and merge it on another computer, and the importing device will appear in the device selector.