AI Token Tracker — Compare Claude, Codex, Gemini & More
Every AI coding tool leaves a different usage trail. Claude Code records usage in its local project logs. Codex writes token-count events into session JSONL files. Gemini stores chat-session token data. OpenCode keeps usage data in its local data store.
If you use more than one tool, you have no idea what your total spend actually is. Each tool shows you its own numbers. Nobody shows you the combined picture.
This guide explains how an AI token tracker turns fragmented tool-specific data into one unified dashboard.
1. The Fragmentation Problem
| Tool | What It Shows You | What It Hides |
|---|---|---|
| Claude Code | Per-session cost in the sidebar | No cross-session totals |
| Codex | Percentage consumed in /status | No absolute token counts |
| Gemini | Token count per chat | No project-level aggregation |
| OpenCode | SQLite logs with raw usage | No visualization at all |
| Amp | Thread-level JSON dumps | No monthly trends |
| Pi-Agent | Session JSONL files | No multi-tool comparison |
The result: you know you spent "something" on AI coding this month, but you cannot say how much, where, or which tool is the expensive one.
2. What a Unified AI Token Tracker Does
An AI token tracker reads the log files that each tool already writes to your machine. It extracts token counts, timestamps, and model information from all sources, then serves them in one place.
- Total daily token burn across all tools
- Cost breakdown per tool (donut chart)
- Monthly spending trend (line chart)
- Activity heatmap (GitHub-style, 90 days)
- Top models by total cost
- Project-level splits
3. Supported Tools
- Claude Code —
~/.claude/projects/**/*.jsonl - Codex —
~/.codex/sessions/**/*.jsonl - Gemini —
~/.gemini/tmp/**/chats/session-*.json - OpenCode —
~/.local/share/opencode/(JSON + SQLite) - Amp —
~/.local/share/amp/threads/**/*.json - Pi-Agent —
~/.pi/agent/sessions/**/*.jsonl
4. How to Start
No install, no config:
npx tokenbbq@latest
Opens a dashboard at localhost:3000. Auto-refreshes every 5 seconds.
5. Who Needs This
- Freelancers billing clients for AI-assisted work
- Teams tracking shared AI tool budgets
- Developers comparing cost-efficiency across tools
- Anyone who wants to know where their token budget goes
6. Related Guides
- How to Track OpenAI Codex Token Usage — absolute numbers, not just percentages.
- Track Codex Tokens with Absolute Numbers — convert percentages into real counts.
- How to Track Claude Code Token Usage — the Anthropic side with window tracking.
- Track AI Token Usage Per Project — split costs across repositories.