{"slug": "how-i-track-ai-token-spend-across-claude-code-cursor-and-codex", "title": "How I Track AI Token Spend Across Claude Code, Cursor, and Codex", "summary": "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.", "body_md": "# How I Track AI Token Spend Across Claude Code, Cursor, and Codex\n\n[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.\n\nSo I built **TokenMaxxer** — a lightweight CLI that reads the local log files these tools already write on disk and rolls everything into one dashboard.\n\n### What it does\n\n- Scans log directories from 18 supported tools (Claude Code,\n[Cursor](/en/tags/cursor/), Codex, Antigravity, and more) - Aggregates usage by tool, model, provider, and day\n- Shows cost estimates based on your configured pricing\n- Builds a profile page with daily activity trends, top models, and top tools\n- Includes a global leaderboard for people who like a little friendly competition\n\n### Quick start\n\n```\n# Install via pip\npip install tokenmaxxer\n\n# Or run directly with Python\npython -m tokenmaxxer scan\n\n# View your dashboard\npython -m tokenmaxxer serve\n```\n\nBy default it looks in standard log locations, but you can point it anywhere:\n\n```\ntokenmaxxer scan --paths ~/.claude/logs,~/cursor/logs,~/codex/logs\n```\n\nThe dashboard spins up locally on `localhost:8000`\n\nand updates in real time as new logs appear.\n\n### Real-world results\n\nAfter 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.\n\nThe leaderboard currently tops out at **45.8 billion tokens** — if you're a heavy user, that's a fun benchmark to chase.\n\n### Config and customization\n\nYou can override model pricing per provider, which is handy when you're on a free tier or using a self-hosted endpoint:\n\n```\n{\n  \"providers\": {\n    \"anthropic\": {\n      \"claude-3-5-sonnet-20241022\": {\n        \"prompt_price\": 3.0,\n        \"completion_price\": 15.0\n      }\n    }\n  }\n}\n```\n\n### Gotchas\n\n- Some tools rotate logs aggressively, so I recommend running the scan daily via cron\n- Antigravity support is community-contributed and may lag behind official releases\n- Cost estimates are based on published pricing — internal rate cards or discounted tiers aren't reflected\n\n### Feedback welcome\n\nI'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.\n\nIf you try it out, drop a line with bugs, feature requests, or leaderboard screenshots — I'd love to see how your usage compares.\n\n[Next Script Your Skills, Not Your Prompts →](/en/threads/4928/)\n\n[an AI side-hustle playbook](http://154.12.95.112/), with plenty of directly applicable cases.", "url": "https://wpnews.pro/news/how-i-track-ai-token-spend-across-claude-code-cursor-and-codex", "canonical_source": "https://promptcube3.com/en/threads/4929/", "published_at": "2026-08-04 13:06:44+00:00", "updated_at": "2026-08-04 13:55:14.149107+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-infrastructure"], "entities": ["TokenMaxxer", "Claude Code", "Cursor", "Codex", "Antigravity", "Claude 3.5 Sonnet", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/how-i-track-ai-token-spend-across-claude-code-cursor-and-codex", "markdown": "https://wpnews.pro/news/how-i-track-ai-token-spend-across-claude-code-cursor-and-codex.md", "text": "https://wpnews.pro/news/how-i-track-ai-token-spend-across-claude-code-cursor-and-codex.txt", "jsonld": "https://wpnews.pro/news/how-i-track-ai-token-spend-across-claude-code-cursor-and-codex.jsonld"}}