Quickstart
Install tokenmaxxing, log in your first pooled account, and pool more
Requires Bun and Claude Code, on macOS or Linux.
Install the CLI
Install with Bun, or from the flake if you already use Nix / nix-darwin. Put the CLI on PATH before init (see Build and distribution).
bun add -g tokenmaxxingNix users replace the Bun step with this command, or enable programs.tokenmaxxing in their nix-darwin or Home Manager config:
nix profile install github:anaclumos/tokenmaxxingRun init
tokenmaxxing initinit first verifies the real claude binary and pins its path as claudeBin in config.json, then does five things:
- Login. Starts an isolated
claudesession in a throwaway config home and asks you to run/loginthere (the browser sign-in) for your first pooled account.- It asks even if you are already signed in, and it keeps your existing login available to Claude sessions started outside the supervisor.
- The login lands in that account's own credential store; the one you already have is never copied.
- Supervisor shim. Installs the
claudesupervisor shim, beside thetokenmaxxingandxxentry points, in~/.config/tokenmaxxing/bin/. - Claude Code entries. Installs five entries in Claude Code's
settings.json: a statusLine, a subagentStatusLine, a Stop hook, a StopFailure hook, and a SessionStart hook. - PATH. Adds the bin directory to PATH in your shell rc when it does not already sit ahead of the real
claude(idempotent, marked with a# tokenmaxxing PATHcomment). On a Nix-managed or unwritable rc it prints the line to add instead. - Service units.
- A periodic check timer (a launchd agent on macOS, a systemd user timer on Linux) that runs
tokenmaxxing checkonce per tick (policy.checkIntervalMs, 60 seconds by default). - A usage hub service that runs
tokenmaxxing servefor a dashboard such as T3 Code (see Usage hub).
- A periodic check timer (a launchd agent on macOS, a systemd user timer on Linux) that runs
A second init on a pool that already has accounts re-installs the shim, the entries, and the service units, adds the PATH line as in item 4 when the bin directory does not sit ahead of the real claude, and skips the login.
Add more accounts
Restart your shell, then add more accounts:
tokenmaxxing add # logs one more account in, in isolation, and pools itRun claude
claude # use claude as alwaysEach claude you start is placed on the pooled account with the most session headroom per running session, so two sessions land on two accounts.
xx is a second entry point for tokenmaxxing. Bare tokenmaxxing (or xx) runs status.