tokenmaxxing

Set up tokenmaxxing

One command reads your local agent logs and prints a report. Nothing leaves your machine unless you link it and push.

The quick way

Paste this into your coding agent. It runs the tracker, shows you the report, and asks before publishing anything.

Paste into your coding agent
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.

ts2026-09-22T13:00:00ZThe hour, rounded down. Nothing finer.
sourceclaudeWhich tool: claude, codex, gemini or cursor.
modelclaude-opus-5-5The model id the tool logged.
input, output2912, 217904Token counts for that hour and model.
cache_read, cache_write_5m, cache_write_1h317502113, 8902114, 0Cache token counts, priced separately.
reasoning0Reasoning tokens, informational (already inside output).
requests, conversations412, 6How many API calls and chats that hour.
deviceIda random uuidGenerated 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

  1. npx tokenmaxxing-cli hook uninstall and npx tokenmaxxing-cli schedule uninstall, if you installed either.
  2. Delete the local data: rm -rf ~/.tokenmaxxing.
  3. If you linked a device, revoke it on your account page and make your profile private.