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 start of the period: the hour, rounded down, or 00:00 UTC for daily and Monday 00:00 UTC for weekly totals. 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 period 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 in that period. |
| deviceId | a random uuid | Generated once on your machine, so two laptops don't overwrite each other. |
| granularity | hour | hour, day or week: how coarse the rows are. You choose it; see below. |
Hourly, daily or weekly
Hourly rows (the default) give your profile the most detail. Daily or weekly totals mean the site never sees which hours you work, at the cost of that detail. Changing it replaces every row the site holds for that device on the next push, so nothing is counted twice.
npx tokenmaxxing-cli granularity set hour|day|week
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.