Repository navigation
Releases: doxaras/claude-rotate
Releases · doxaras/claude-rotate
Release list
v1.0.0 — first public release
A tiny self-hosted proxy that lets Claude Code ride multiple Claude Max/Pro subscriptions — one process, one config file, no database.
Highlights
- Multi-device server model — laptop, desktop, and CI box all point at one proxy via
ANTHROPIC_BASE_URL. Devices hold only revocable device keys; the year-long account tokens never leave the server. - Consume-first rotation — weekly quota is use-it-or-lose-it, so the proxy burns the account whose weekly window resets soonest. No paid quota expires unused.
- Burst-aware 429 handling — a per-minute burst paces the same account (keeping the warm prompt cache); only genuinely spent quota rotates. Cooldown + hysteresis stop threshold ping-pong.
- Hold-until-reset — when every account is spent, requests park until the soonest window reset instead of failing, so overnight/CI runs finish on their own.
- Priority tiers & disabled flag —
prioritymakes backup accounts a spillway (traffic pulled back automatically when the preferred tier recovers);disabled: truebenches an account. - Analytics panel — live 5h/7d quota gauges from Anthropic's own
anthropic-ratelimit-unified-*headers, per-device/model/account consumption, and cost-equivalent dollars. - Herd-safe, by test — 101 offline checks incl. a stress suite: 100 in-flight requests during a quota hit produce exactly one switch; ~3.5k req/s proxy overhead ceiling. CI-verified on Python 3.10/3.12/3.14.
Terms of Service
This tool rotates accounts you personally own and pay for; each account's limits stay fully enforced by Anthropic. That's a gray area under the consumer terms — use at your own risk, and do not use consumer subscriptions to back a shared or commercial service. See the README's ToS note and the honest comparison with similar projects.
Quickstart
```bash
git clone https://github.com/doxaras/claude-rotate && cd claude-rotate
pip install -r requirements.txt
./setup.sh && ./setup.sh add-account acct-1 && ./setup.sh add-device my-laptop
python3 rotator.py
```