cd /news/developer-tools/how-i-track-ai-token-spend-across-cl… · home topics developer-tools article
[ARTICLE · art-86172] src=promptcube3.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

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

Developer built TokenMaxxer, a lightweight CLI that aggregates AI token usage and cost across 18 tools including Claude Code, Cursor, and Codex, after finding that Claude 3.5 Sonnet consumed roughly 60% of daily token budget through Claude Code sessions. The tool scans local log files, provides a dashboard on localhost:8000, and includes a leaderboard currently topped at 45.8 billion tokens.

read2 min views1 publishedAug 4, 2026
How I Track AI Token Spend Across Claude Code, Cursor, and Codex
Image: Promptcube3 (auto-discovered)

Claude Code, 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, 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

pip install tokenmaxxer

python -m tokenmaxxer scan

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 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 →

an AI side-hustle playbook, with plenty of directly applicable cases.

── more in #developer-tools 4 stories · sorted by recency
── more on @tokenmaxxer 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-track-ai-token…] indexed:0 read:2min 2026-08-04 ·