A multiplexing load-balancer proxy for Claude Code (and Codex/OpenAI). It fans your
requests across multiple backend accounts through one local endpoint, so you stop
hitting per-account rate limits. Point Claude Code at it with ANTHROPIC_BASE_URL,
add your accounts in the dashboard, and it routes and falls back across them.
ClankerMux began as a fork of tombii/better-ccflare (itself a fork of snipeship/ccflare). After 30+ upstream PRs I just decided to just have my own bespoke solution. Fast iteration and tailored to my use-case, mostly Anthropic and OpenAI accounts.
Features:
- Multiplexes one endpoint across multiple Anthropic, Codex/OpenAI, and OpenAI-compatible accounts.
- Capacity-aware account selection (FEFO) — maximizes total token availability across the pool.
- Sticky session routing for high prompt-cache hit rates; survives priority edits and failover.
- Transparent burst-429 retry — rides out rate-limit storms without losing the prompt cache.
- Overload (529) detection, cooldowns, and cross-provider fallback.
- Manual control: priorities, pause/resume, force-account mode, pin an API key to an account.
- Native Responses-API passthrough for Codex CLI.
- Proxy API keys separate from dashboard access.
- Web dashboard: accounts, request history, rate-limit graphs with burn-rate forecasts, analytics, spend tracking, logs.
- Small dependency tree; memory-leak and stability hardening for long-running deployments.
Requires Bun.
git clone https://github.com/d4rken/better-ccflare
cd better-ccflare
bun install
bun run build # builds the dashboard (required before first run)
bun start # serves the proxy + dashboard on http://localhost:8080Add your provider accounts in the dashboard, then point Claude Code at the proxy.
Set ANTHROPIC_BASE_URL to the ClankerMux endpoint. With a logged-in Claude Pro/Team
CLI you don't need a token:
export ANTHROPIC_BASE_URL=http://localhost:8080
claudeIf ClankerMux has API keys configured (or you aren't using Claude CLI's OAuth login),
also set a token — dummy-key when ClankerMux runs open, or a generated key when it's
protected:
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_AUTH_TOKEN=dummy-key # or a key generated in the dashboard
claudeDon't set
ANTHROPIC_AUTH_TOKENalongside an active Claude CLI OAuth login — Claude CLI warns about conflicting auth. LegacyBETTER_CCFLARE_*env vars and thex-better-ccflare-account-idheader are still accepted.
MIT — see LICENSE.