The best place to track token usage
A local CLI, built on ccusage, that syncs your token usage with everyone else.
This installs the latest official package published to npm:
npm install -g @851-labs/tokenmaxxing@latest
tokenmaxxing bootstrapTo install the current main branch from the
HappyGamblingAddict/tokenmaxxing fork
globally on Windows, download and run
install.bat.
The script downloads the repository, installs Bun if it is missing, builds the
CLI, and installs that build as the global tokenmaxxing command. Node.js/npm
is required. No repository files need to be kept afterward.
If you already have the repository checked out, run install.bat from its
root. For quick testing without changing the global command, use
tokenmaxxing-local.bat instead.
bootstrap signs you in, syncs the usage already on your machine, optionally
installs automatic syncing, and opens your public profile.
tokenmaxxing uses ccusage to read local coding-agent usage, turn it into daily token and API-equivalent spend totals, and sync those aggregates to your public profile. The leaderboard lets you compare spend or tokens over the last 7 days, 30 days, or all time.
Sync is idempotent and profiles aggregate across devices, so you can run
tokenmaxxing bootstrap on every machine and sync as often as you like.
- Claude Code
- OpenAI Codex
- OpenCode
- Gemini CLI
- GitHub Copilot CLI
- Hermes
- Pi
- Oh My Pi
- Grok Build CLI
- Antigravity
- ZCode
- Amp
- Qwen Code
- Kimi CLI
- Kilo Code
- Goose
- Droid
- Codebuff
- OpenClaw
Agents stored outside their default location are found through the same
environment variables ccusage reads (for example CODEX_HOME, GROK_HOME, or
AMP_DATA_DIR; see ccusage's
environment variables).
Oh My Pi is read with ccusage's Pi parser, pointed at OMP's own sessions:
~/.omp/agent/sessions and every named profile under ~/.omp/profiles/,
following PI_CONFIG_DIR and an existing $XDG_DATA_HOME/omp like OMP does.
Pi and Oh My Pi never count each other's sessions: OMP ignores PI_AGENT_DIR,
and Pi skips any PI_AGENT_DIR entry that points at OMP's sessions.
tokenmaxxing sync # Sync all local usage
tokenmaxxing sync --dry-run # Preview exactly what would be sent
tokenmaxxing sync --since 2026-01-01 # Only sync usage on or after a date
tokenmaxxing sync --sources claude,codex # Only sync selected agents
tokenmaxxing service install # Sync automatically every 5 minutes
tokenmaxxing service status # Show service health and the last run
tokenmaxxing service doctor # Check auth, scheduler, locks, and logs (exit 1 on a problem)
tokenmaxxing whoami # Show the signed-in account
tokenmaxxing upgrade # Upgrade the CLI and refresh the service
tokenmaxxing logout # Revoke this device's CLI tokenOn Windows, run tokenmaxxing-local.bat sync --dry-run from this checkout to
test the local CLI source without replacing the globally installed package.
To install the local build globally so tokenmaxxing uses it from any folder,
run install.bat from this checkout.
The background service supports macOS, Linux, and Windows. It uses the global
tokenmaxxing binary and keeps itself current through the package manager that
installed the CLI when that package manager can be detected.
Custom agent log roots (CLAUDE_CONFIG_DIR, CODEX_HOME, OPENCODE_DATA_DIR,
GEMINI_DATA_DIR, COPILOT_HOME, COPILOT_OTEL_FILE_EXPORTER_PATH,
HERMES_HOME, PI_AGENT_DIR, GROK_HOME, ANTIGRAVITY_DATA_DIR, ZCODE_HOME,
AMP_DATA_DIR, QWEN_DATA_DIR, KIMI_DATA_DIR, KILO_DATA_DIR,
GOOSE_PATH_ROOT, DROID_SESSIONS_DIR, CODEBUFF_DATA_DIR, OPENCLAW_DIR,
PI_CONFIG_DIR, XDG_DATA_HOME, XDG_CONFIG_HOME) are captured from
your shell when you run tokenmaxxing service install or
tokenmaxxing service repair; rerun one of those after changing them, and
tokenmaxxing service doctor warns when they drift. Without HERMES_HOME, both
sync and the service read the default Hermes root plus every named profile
under ~/.hermes/profiles/.
Only daily aggregates are uploaded: date, model name, agent name, token counts,
and API-equivalent cost. tokenmaxxing never uploads prompts, file paths, project
names, code, or session content. Preview the exact payload anytime with
tokenmaxxing sync --dry-run.
Profiles and leaderboard totals are public. Device hostnames are visible only
to you in settings and your per-device breakdown. CLI tokens do not expire
automatically; revoke one with tokenmaxxing logout or from
settings.
Use Bun 1.4.2 and Node.js 24.18.0 (the CI runtime). Vite+ is installed locally; no global CLI installation is required.
bun install --frozen-lockfile
bun run dev # Start the Alchemy development environment
bun run check # Check formatting, lint rules, and types
bun run test # Run all test projects
bun run build # Build workspaces in dependency order
bun run fmt:fix # Format filesShared formatting, linting, and test settings live in the root
vite.config.ts; the web app keeps its framework plugins in apps/www/vite.config.ts.
bun run check includes TypeScript diagnostics through lint.options.typeCheck.
Builds use Vite Task caching. Checks, tests, and database generation are uncached.
Run tests from the repository root. To run one project, use
bun run vp test --project cli (or api, www, api-contract, or db).
Use bun run vp test watch --project cli for watch mode.
Vite+ pins its bundled tools. Keep the vite catalog alias and override aligned
with the vite-plus version so framework plugins and Alchemy use the same Vite core.
The root Vitest 5 dependency satisfies Alchemy's @effect/vitest peer; our tests
import vite-plus/test and run on Vite+'s bundled Vitest version.
Join the Discord, follow @pondorasti, or open an issue. If you like tokenmaxxing, please consider giving the project a star.
This project is released under the MIT License.