How to Track Claude Code Token Usage
Claude Code shows you how much of your subscription you have used. What it does not show is how many tokens that actually is.
"50 % consumed" could mean 200,000 tokens or 2,000,000 tokens. The difference matters when you are pacing a long session or comparing costs across projects.
This guide shows how TokenBBQ turns Claude Code's percentage into real, absolute numbers you can act on.
1. What Claude Code Shows You Today
Claude Code has built-in counters you can access inside the CLI:
/usage— your current session's token consumption/cost— the estimated cost of the current session
These are useful for a quick check, but they have limits:
- They show only the current session, not cumulative usage across the day
- They do not show input versus output tokens separately
- They do not compare Claude Code usage against other AI tools you might be running
The Anthropic Console gives you account-level usage, but it updates with a delay and requires leaving your terminal.
2. What TokenBBQ Adds
TokenBBQ reads the logs that Claude Code already writes to your machine and turns them into a dashboard. No proxy, no network interception, no code changes.
| What you get | Claude Code native | With TokenBBQ |
|---|---|---|
| Absolute token count | No — percentages only | Yes — input + output |
| Cross-session daily total | No | Yes — auto-aggregated |
| Multi-tool comparison | No — only Claude | Yes — Claude, Codex, Gemini, etc. |
| Live dashboard | No | Yes — browser + CLI |
| Project-level split | No | Yes — by working directory |
3. How TokenBBQ Works
TokenBBQ reads the log files that Claude Code writes locally. It extracts token counts, timestamps, and model information, then serves them in two forms:
- Web dashboard — open in your browser, auto-refreshes every 5 seconds
- Terminal output —
npx tokenbbq daily,npx tokenbbq monthly,npx tokenbbq summary, or--json
Everything stays on your machine. The only network request TokenBBQ makes is to fetch current API pricing from LiteLLM so cost estimates stay accurate.
4. Quick Start
No install, no config, no API key:
npx tokenbbq@latest
This starts the web dashboard on http://localhost:3000. Run Claude Code as usual. TokenBBQ picks up the log data automatically.
For terminal-only output:
npx tokenbbq@latest daily
npx tokenbbq@latest monthly
npx tokenbbq@latest summary --json
5. About the Desktop Pill
TokenBBQ also offers a separate desktop widget — the Pill — that floats above your IDE and shows subscription usage at a glance.
- Claude.ai subscription fill (5-hour and 7-day windows with reset time)
- Tokens consumed today from all local AI tools
- Toggle to switch the Pill between Claude Code and Codex view
The Pill is a separate desktop app with its own installer. It is not part of npx tokenbbq. One click on the Pill opens the full dashboard.
6. What the Numbers Mean
TokenBBQ shows three metrics for Claude Code:
- Input tokens — your code, prompts, and context sent to Claude
- Output tokens — Claude's responses, diffs, and explanations
- Estimated cost — based on Anthropic's published pricing per model tier
The cost estimate is not official billing. It is a quick sanity check based on current API rates.
7. Relationship to ccusage
ccusage by ryoppippi is the recognized predecessor for Claude Code token tracking. TokenBBQ builds on ccusage's data-loading patterns — that is stated in our README.
The difference: ccusage is terminal-focused and primarily for Claude Code. TokenBBQ adds a web dashboard, supports more tools, and tracks multiple AI CLIs in one place.
8. Related Guides
- How to Track OpenAI Codex Token Usage — same setup for the OpenAI side, with a Codex-vs-Claude comparison table.
- Track AI Token Usage Per Project — split daily token costs across multiple repositories.
9. Summary
Claude Code's native counters are fine for a quick look inside a single session. When you need absolute numbers, cross-session totals, or a view across multiple AI tools, TokenBBQ fills the gap.
Open-source, local-only, no sign-up. Run it once alongside Claude Code and stop guessing what "50 %" actually means.