Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
node_modules
node_modules
.DS_Store
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- [2026-07-17] [the readme is the landing page: real captures only](https://github.com/RubricLab/tokenmaxx/commit/0db404df5a3d7ac4fa7fadcc8c4d7d1a74139ae4)
- [2026-07-17] [drop the asset factory: fixture renders, remotion, brand generator](https://github.com/RubricLab/tokenmaxx/commit/3de71c1a13402ff8abb24bb111cdca42a25d5267)
- [2026-07-17] [routing becomes a plain tokenmaxx on/off in settings

The accounts title is quiet when on (just the auto policy) and shows '✗ off'
Expand Down
148 changes: 74 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
<div align="center">

<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/logo-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="assets/brand/logo-light.svg">
<img alt="tokenmaxx" src="assets/brand/logo-dark.svg" width="440">
</picture>
<img alt="TOKENMAXX" src="media/wordmark.png" width="520">

<br/><br/>
<br/>

**Juggle rate limits across all your Codex and Claude Code accounts — and see every token you burn.**
**Juggle rate limits across all your Codex and Claude Code accounts. See every token you burn.**

<sub>macOS · [Bun](https://bun.sh) · [tokenmaxx.sh](https://tokenmaxx.sh) · a [Rubric Labs](https://rubriclabs.com) project</sub>
<sub>macOS · [Bun](https://bun.sh) · a [Rubric Labs](https://rubriclabs.com) project · not affiliated with OpenAI or Anthropic</sub>

<br/>
<br/><br/>

<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/generated/flagship-dark.png">
<source media="(prefers-color-scheme: light)" srcset="assets/generated/flagship-light.png">
<img alt="tokenmaxx beside live Claude Code and Codex sessions" src="assets/generated/flagship-dark.png">
</picture>
<img alt="a day of juggling: meters fill, accounts max out, the active dot hops to fresh ones" src="media/relay.gif" width="820">

</div>

Expand All @@ -29,95 +21,103 @@ bun add -g tokenmaxx
```

```bash
tokenmaxx login codex # sign in (isolated; existing sessions untouched)
tokenmaxx login codex # sign in; your existing sessions stay untouched
tokenmaxx login claude
tokenmaxx install # route native codex & claude through tokenmaxx
tokenmaxx install # route native codex & claude through tokenmaxx

codex # use the clients as before — tokenmaxx injects the account
claude
codex # use your clients as before
claude # tokenmaxx injects the account, per request
```

## What it does

You have more than one Codex and Claude subscription, and you keep hitting the five-hour or
weekly limit on whichever you're using. tokenmaxx runs a loopback proxy on `127.0.0.1:8459`
that reads the **active account per request** and injects its credential — so switching takes
effect on the very next request, even mid-turn, with the clients running unmodified.
Credentials stay in the macOS Keychain; nothing but opaque references touches disk.

Both providers report live rate-limit state on every response, and the proxy reads it as
traffic streams by — so tokenmaxx always knows exactly how full the active account is, with
zero extra requests. Anything speaking the Anthropic or OpenAI Responses API can point at
`http://127.0.0.1:8459/anthropic` or `/openai` and get the same juggling — the proxy doesn't
care which harness is on the other end.

## Dashboard

Run `tokenmaxx` for a live dashboard. **Accounts** shows every account and its rate-limit
windows, colored by pressure; press space to expand one. **Analytics** is a combined
token-throughput view (tokens/time across every account and both providers) with total
tokens, the **≈ API-list-price value** you're extracting from your flat subscriptions, a
per-model breakdown, and the input / output / cache-read / cache-write split. Tokens are
metered by the proxy as responses stream by — every number is cross-checkable against the
clients' own session logs — and it never buffers or delays them. **Settings** tunes
auto-rotation, the switch threshold, and dwell per provider, applied live.
You run a fleet of coding agents, and they burn through the five-hour or
weekly limit on whichever subscription you're using:

<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/generated/analytics-dark.png">
<source media="(prefers-color-scheme: light)" srcset="assets/generated/analytics-light.png">
<img alt="token throughput, API value, and the per-model split" src="assets/generated/analytics-dark.png" width="820">
</picture>
<img alt="a desktop full of parallel agent sessions burning tokens" src="media/fleet.gif" width="820">
</div>

tokenmaxx runs a loopback proxy that reads the active account on every request
and injects its credential, so a switch lands on the very next request, even
mid-turn, with your clients running unmodified. Credentials stay in the macOS
Keychain; nothing but opaque references touches disk.

## The dashboard

Run `tokenmaxx`. **Accounts** shows every account and its live rate-limit
windows, colored by pressure, with plan tier and reset countdowns inline. Rows
sort by pressure; the ● marks where traffic is going right now.

<div align="center">
<img alt="every account and its live rate-limit windows, colored by pressure" src="media/accounts.png" width="820">
</div>

**Analytics** is combined token throughput across all accounts and both
providers, with the ≈ API-list-price value you're pulling from your flat
subscriptions. Tokens are metered as responses stream by, never buffered, so
every number is cross-checkable against your clients' own session logs. Press
`m` for the full pricing breakdown per model.

<div align="center">
<img alt="combined token throughput and API-list-price value across all accounts" src="media/analytics.png" width="820">
</div>

**Settings** holds the master on/off per provider, then auto-rotation, the
switch threshold, and cooldown, applied live.

<div align="center">
<img alt="routing, auto-rotation, threshold, and cooldown, tuned per provider" src="media/settings.png" width="820">
</div>

## Auto-rotation

Turn it on and tokenmaxx moves off an account the moment its fullest window crosses your
threshold, onto the one with the most headroom — mid-turn, on the next request. Pressure is
read off every response, so a burst from a fleet of parallel agents can't outrun the switch;
if an account still hits its hard limit mid-flight, the proxy rotates and retries that request
on the next account before your client ever sees the 429. It's off by default; enabling it is
Turn it on and tokenmaxx steps off an account the moment its fullest window
crosses your threshold, onto the one with the most headroom. If an account
still hits its hard limit mid-flight, the proxy rotates and retries that
request before your client ever sees the 429. Off by default; enabling it is
your confirmation that your provider permits this use.

```bash
tokenmaxx auto both on --threshold 90 # or: codex | claude … off
```

<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/generated/switch-dark.gif">
<source media="(prefers-color-scheme: light)" srcset="assets/generated/switch-light.gif">
<img alt="an at-limit account rotating to a fresh one" src="assets/generated/switch-dark.gif" width="740">
</picture>
</div>
## How it works

A single loopback proxy on `127.0.0.1:8459`, and the clients you already use.

- **Account per request.** The proxy reads which account is active for each
request and injects its credential. Switching lands on the next request.
- **Pressure read for free.** Both providers report rate-limit state on every
response; the proxy reads it as traffic streams by, so it always knows how
full the active account is, with zero extra requests.
- **Harness-agnostic.** Anything speaking the Anthropic or OpenAI Responses API
can point at `/anthropic` or `/openai` and get the same juggling.

## Commands

| Command | |
|---|---|
| `tokenmaxx` | Live dashboard |
| `tokenmaxx login <codex\|claude>` | Sign in (idempotent) |
| `tokenmaxx install` · `uninstall` | Route native clients · restore config |
| `tokenmaxx switch <codex\|claude> <email>` | Make an account active |
| `tokenmaxx auto <codex\|claude\|both> <on\|off> [--threshold N]` | Auto-rotation |
| `tokenmaxx list` · `status` · `refresh` · `doctor` | Accounts · JSON · re-probe · checks |
```text
tokenmaxx live dashboard
tokenmaxx login <codex|claude> sign in; isolated, idempotent
tokenmaxx install route native codex & claude
tokenmaxx uninstall restore native config
tokenmaxx switch <codex|claude> <email> make an account active
tokenmaxx auto <both|codex|claude> <on|off> [--threshold N]
tokenmaxx list | status | refresh | doctor
```

Env: `TOKENMAXX_HOME`, `TOKENMAXX_PROXY_PORT`, `TOKENMAXX_THEME`.

## Not affiliated

tokenmaxx is an independent [Rubric Labs](https://rubriclabs.com) project. It is **not** an
official product of, affiliated with, or endorsed by OpenAI or Anthropic. Use only accounts
you own, and only where the relevant terms permit account automation.

## Credits

Inspired by [`codex-account-switcher`](https://github.com/Sls0n/codex-account-switcher) by
[Sls0n](https://github.com/Sls0n) — thanks for the spark.
An independent [Rubric Labs](https://rubriclabs.com) project, not an official
product of, affiliated with, or endorsed by OpenAI or Anthropic. Use only
accounts you own, and only where the relevant terms permit account automation.
Inspired by [codex-account-switcher](https://github.com/Sls0n/codex-account-switcher).

<div align="center">
<br/>
<a href="https://rubriclabs.com"><img alt="Rubric Labs" src="assets/brand/rubric-mark.svg" width="44"></a>
<a href="https://rubriclabs.com"><img alt="Rubric Labs" src="media/rubric-mark.svg" width="40"></a>
<br/>
<sub>Built by <a href="https://rubriclabs.com">Rubric Labs</a> · <a href="./LICENSE">go nuts</a></sub>
</div>
6 changes: 0 additions & 6 deletions assets/.gitignore

This file was deleted.

61 changes: 0 additions & 61 deletions assets/README.md

This file was deleted.

93 changes: 0 additions & 93 deletions assets/assets.config.ts

This file was deleted.

14 changes: 0 additions & 14 deletions assets/brand/logo-dark.svg

This file was deleted.

14 changes: 0 additions & 14 deletions assets/brand/logo-light.svg

This file was deleted.

Loading
Loading