Set up tokenmaxxing
The quick way
Paste this into your coding agent. It runs the tracker, shows you the report, and asks before publishing anything.
Set up tokenmaxxing for me: run `npx tokenmaxxing-cli@latest init`, show me the report it prints, and if I like it run `npx tokenmaxxing-cli link` and open the URL it prints. Don't edit any of my tool config files unless I say so.
Or run it yourself
Node 20 or newer. No global install, no dependencies.
npx tokenmaxxing-cli@latest init
init detects Claude Code, Codex and Gemini CLI logs, parses them into hourly totals in ~/.tokenmaxxing/, and prints the report. Set your plan for an ROI line with npx tokenmaxxing-cli plan set claude max-20x.
To publish, run npx tokenmaxxing-cli link, open the URL it prints, sign in with GitHub and confirm the code. Then npx tokenmaxxing-cli push uploads your totals, printing the row count and date range first.
What gets uploaded
Only when you run push, and only rows like these. Never prompts, responses, file paths, project names, git branches or credentials. The tracker never reads credential files.
| Field | Example | What it is |
|---|---|---|
| ts | 2026-09-22T13:00:00Z | The hour, rounded down. Nothing finer. |
| source | claude | Which tool: claude, codex, gemini or cursor. |
| model | claude-opus-5-5 | The model id the tool logged. |
| input, output | 2912, 217904 | Token counts for that hour and model. |
| cache_read, cache_write_5m, cache_write_1h | 317502113, 8902114, 0 | Cache token counts, priced separately. |
| reasoning | 0 | Reasoning tokens, informational (already inside output). |
| requests, conversations | 412, 6 | How many API calls and chats that hour. |
| deviceId | a random uuid | Generated once on your machine, so two laptops don't overwrite each other. |
Hooks are opt-in
By default the tracker only runs when you run it. If you want totals kept fresh, tokenmaxxing hook install adds a Claude Code Stop hook and a Codex notify hook that run sync. It prints the exact change to your config and waits for a yes before writing, and keeps a backup. tokenmaxxing schedule install is the alternative: a launchd or cron job every 30 minutes, with no edits to other tools.
Uninstall
npx tokenmaxxing-cli hook uninstallandnpx tokenmaxxing-cli schedule uninstall, if you installed either.- Delete the local data:
rm -rf ~/.tokenmaxxing. - If you linked a device, revoke it on your account page and make your profile private.