shunt
A local proxy that pools multiple Claude accounts behind a single endpoint, routing requests across accounts to maximize your available rate limits.
─┐ shunt v0.1.0
─┼─▶ 2 accounts · http://127.0.0.1:8082
─┘ Proxying Claude API across multiple accounts
What it does
Claude's rate limits are per-account. If you hit your 5-hour or weekly limit on one account, you're stuck waiting. Shunt sits in front of the Anthropic API and automatically routes each request to whichever account has the most remaining capacity — so you get the combined limits of all your accounts.
- Least-utilization routing — tracks live
anthropic-ratelimit-unified-*headers and always picks the account with the most headroom - Auto-failover — if one account is rate-limited, the next request goes to another
- Transparent — drop-in replacement for
api.anthropic.com; works with Claude Code, the SDK, or any tool that speaks the Anthropic API - Account management — add or remove accounts without restarting manually
Install
|
This downloads the right pre-built binary for your OS and arch — no Rust or other dependencies needed.
Or via cargo:
Setup
Shunt uses OAuth — the same session Claude Code uses — so there's no API key to manage.
Step 1: Import your existing Claude Code session
This auto-imports the credentials Claude Code already has on disk. Takes a second.
Step 2: Add a second account
Log out of Claude Code, log in with your second Claude account, then:
Or give it any name you want (work, personal, etc.):
This opens a browser for OAuth authorization.
Step 3: Start the proxy
The proxy starts in the background and your terminal is immediately returned. To point Claude Code at it:
Add that to your .zshrc / .bashrc (shunt setup offers to do this automatically).
Usage
Status output
── ACCOUNTS ────────────────────────────────────────────────
✓ work Claude Pro you@example.com available 1.2M tok
5h window ████████░░░░░░░░░░ 61% remaining ok resets in 2h 14m
7d window ███░░░░░░░░░░░░░░░ 79% remaining ok resets in 4d 6h
Extra usage available
✓ personal Claude Pro alt@example.com available fresh
5h window ░░░░░░░░░░░░░░░░░░ 100% remaining ok
How routing works
Every response from the Anthropic API includes anthropic-ratelimit-unified-5h-utilization headers (a float from 0–1). Shunt captures these and always routes the next request to the account with the lowest 5-hour utilization. Fresh accounts (no data yet) are treated as 0% utilized and get highest priority.
If a request returns 429 or 529, shunt marks that account as cooling and retries with the next-best account automatically.
Configuration
Config lives at ~/Library/Application Support/shunt/config.toml (macOS) or ~/.config/shunt/config.toml (Linux):
[]
= "127.0.0.1"
= 8082
= "info"
[[]]
= "work"
= "pro"
[[]]
= "personal"
= "pro"
Credentials are stored separately in credentials.json (never in the config file).
Files
| File | Location |
|---|---|
| Config | ~/Library/Application Support/shunt/config.toml |
| Credentials | ~/Library/Application Support/shunt/credentials.json |
| Logs | ~/Library/Application Support/shunt/proxy.log |
| Status API | http://127.0.0.1:8082/status |
Requirements
- Rust 1.75+
- One or more Claude Pro / Max accounts
- Claude Code installed (shunt borrows its OAuth credentials)
Notes
- Both accounts need to be different Claude logins — two sessions from the same account won't double your limits
- Shunt only proxies
/v1/messagesand/v1/messages/count_tokens— everything else passes through untouched shunt startautomatically kills and replaces any running instance