Star1
1

Set up tokenmaxxing

One command reads your local agent logs and prints a report. Uploads start only when you push or explicitly enable automatic uploads after linking.

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

A manual push or an automatic upload you explicitly enable sends 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 start of the period: the hour, rounded down, or 00:00 UTC for daily and Monday 00:00 UTC for weekly totals. Nothing finer.
sourceclaudeWhich tool: claude, codex, gemini or cursor.
modelclaude-opus-5-5The model id the tool logged.
input, output2912, 217904Token counts for that period 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 in that period.
deviceIda random uuidGenerated once on your machine, so two laptops don't overwrite each other.
granularityhourhour, 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

Keep totals fresh

By default the tracker runs only when you run it. npx tokenmaxxing-cli hook install adds a Claude Code Stop hook and a Codex notify hook that run local sync. It shows the changes before writing and keeps a backup. npx tokenmaxxing-cli schedule install runs local sync through launchd or cron. It defaults to every 30 minutes; add --interval 1h, 1d or 1w to run less often. Neither option uploads usage.

To update your linked account automatically, first run npx tokenmaxxing-cli link, then explicitly opt in with npx tokenmaxxing-cli schedule install --push. It syncs and uploads every 30 minutes by default. For a weekly job, use npx tokenmaxxing-cli schedule install --push --interval 1w; it runs Monday at midnight in your local time. The interval controls when the job runs. Your separate granularity choice above controls whether each upload contains hourly, daily or weekly totals. Check the installed cadence and mode with npx tokenmaxxing-cli schedule status; stop it with npx tokenmaxxing-cli schedule uninstall. You can also revoke the device on your account page to reject future uploads.

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.