# How I Track AI Token Spend Across Claude Code, Cursor, and Codex

> Source: <https://promptcube3.com/en/threads/4929/>
> Published: 2026-08-04 13:06:44+00:00

# How I Track AI Token Spend Across Claude Code, Cursor, and Codex

[Claude Code](/en/tags/claude%20code/), Cursor, Codex, and the occasional Antigravity session, the bills stacked up fast — but I had zero visibility into which tool, which model, or which day was burning through my budget.

So I built **TokenMaxxer** — a lightweight CLI that reads the local log files these tools already write on disk and rolls everything into one dashboard.

### What it does

- Scans log directories from 18 supported tools (Claude Code,
[Cursor](/en/tags/cursor/), Codex, Antigravity, and more) - Aggregates usage by tool, model, provider, and day
- Shows cost estimates based on your configured pricing
- Builds a profile page with daily activity trends, top models, and top tools
- Includes a global leaderboard for people who like a little friendly competition

### Quick start

```
# Install via pip
pip install tokenmaxxer

# Or run directly with Python
python -m tokenmaxxer scan

# View your dashboard
python -m tokenmaxxer serve
```

By default it looks in standard log locations, but you can point it anywhere:

```
tokenmaxxer scan --paths ~/.claude/logs,~/cursor/logs,~/codex/logs
```

The dashboard spins up locally on `localhost:8000`

and updates in real time as new logs appear.

### Real-world results

After running it for a week I discovered that [Claude](/en/tags/claude/) 3.5 Sonnet was eating roughly 60% of my daily token budget, almost entirely through Claude Code sessions. That kind of insight is impossible to get when each tool reports in its own isolated UI.

The leaderboard currently tops out at **45.8 billion tokens** — if you're a heavy user, that's a fun benchmark to chase.

### Config and customization

You can override model pricing per provider, which is handy when you're on a free tier or using a self-hosted endpoint:

```
{
  "providers": {
    "anthropic": {
      "claude-3-5-sonnet-20241022": {
        "prompt_price": 3.0,
        "completion_price": 15.0
      }
    }
  }
}
```

### Gotchas

- Some tools rotate logs aggressively, so I recommend running the scan daily via cron
- Antigravity support is community-contributed and may lag behind official releases
- Cost estimates are based on published pricing — internal rate cards or discounted tiers aren't reflected

### Feedback welcome

I'm actively working on support for additional tools (OpenCode, Windsurf, and Amp are on the roadmap), plus a VS Code extension so you can see token spend without leaving your editor.

If you try it out, drop a line with bugs, feature requests, or leaderboard screenshots — I'd love to see how your usage compares.

[Next Script Your Skills, Not Your Prompts →](/en/threads/4928/)

[an AI side-hustle playbook](http://154.12.95.112/), with plenty of directly applicable cases.
