Automatic account routing for Claude Code
Switchboard is a local router for Claude Code. With more than one Claude subscription, it picks the best account
for each new session, and when a request hits a limit it replays it on another account, so the session carries on
without restarting. On one account or several, it records every request, so you and Claude can see how much
of each limit is left, how fast it's going, and when it resets.
Install · Quick start · Screens · How it works · Commands · Documentation
Every Claude subscription has a weekly limit, most a 5-hour one too. When you hit one, Claude Code stops. Claude can't see the limits coming, and switching accounts by hand means quitting, resuming and starting again with a cold prompt cache.
- Limits stop interrupting you. A request that hits a limit is replayed on another account before Claude Code sees it, and the session carries on.
- No quota goes to waste. New sessions go to the account whose weekly quota is most at risk of going unused.
- Claude sees its own limits. A skill lets Claude read every account's usage, pace and resets, and plan its work around them.
- Sessions stay put. A session keeps its account while its prompt cache is warm, and moves only when it must.
- Resets come one at a time. Switchboard staggers your accounts' 5-hour windows, where they have them, so when they're all spent, one is back soon.
- Every request on record. Kept for a year, so you can follow any session and see what your use was worth at API prices against what your plans cost.
- Your usage, always in view. A live dashboard shows what's left in each window, when you'll run out at your pace, and when it resets.
- You and Claude both steer. Pin new sessions to an account, or move running ones, from the command line, the dashboard, or by asking Claude.
- Told in time. Desktop notifications when an account hits a limit, has room again, passes a share you set, or its token nears the end of its year.
- Never in the way. If switchboard can't route a session,
claudestarts as it would without it.
Worth it with one subscription. Claude paces its work on your live usage and your history, every request goes on record, and the dashboard shows where you stand. The router carries every request on that one account; a session that hits a limit has nowhere else to go until you add a second.
Each screen opens its page in the dashboard's docs.
You need macOS, Claude Code, and a Claude subscription or several. setup makes each subscription's long-lived token for you.
brew install leeovery/tools/switchboardOr, with Go 1.27 or later:
go install github.com/leeovery/switchboard/cmd/switchboard@latestswitchboard setup # add your accounts, then the rest
claude # Claude Code, through switchboard
switchboard usage # every account's limits, as they stand
switchboard dashboard # the live dashboardsetup takes you through adding your accounts and installing the rest, full screen, a page a step, making each account's token with claude setup-token as it goes. At the end, enter opens the dashboard. See setup for what each step does.
Claude Code ──ANTHROPIC_BASE_URL──▶ switchboard ──▶ api.anthropic.com
│
├─ chooses the account: sticky per session and model
├─ swaps in that account's token
├─ reads every response's usage headers
└─ records the request, and what the router did
clauderuns through switchboard.setuplinksclaudeto switchboard, which starts the real Claude Code connected to the router.- Requests pass through unchanged. The router swaps in the account's token and never edits a request's body.
- Usage comes from your own traffic. Every response says how full each window is, so knowing costs next to nothing.
- Each session gets an account: the one whose quota most needs using. It keeps that account while its prompt cache is warm.
- A limit moves the session. The router replays the request on another account before Claude Code sees the limit.
- Everything is recorded: each usage reading, request and router event, in a file a day.
For routing, recording, priming and the rest in detail, see How it works.
setup installs a Claude Code skill that tells Claude what switchboard does. With it, Claude can:
- Read the limits.
switchboard statusgives Claude every account's usage, its pace, when it runs out at that pace, and when it resets. Ask Claude to use what's left of this week before it resets at 08:00 without reaching 100%, and it paces its work through the night. - Look back.
sessions,requests,historyandeventsgive Claude your sessions, their requests, your days and what the router did. - Steer when you ask. Claude can pin new sessions to an account, move running ones, or pin its own session.
Run by Claude, these commands print JSON without being asked. See Claude and switchboard for more.
| Command | What it does |
|---|---|
switchboard setup |
Adds your accounts and installs the rest, full screen, a page a step |
switchboard usage |
Prints every account's windows as they stand |
switchboard dashboard |
Opens the live dashboard |
switchboard pin |
Sends sessions to the accounts you name, or back to the router's choice |
switchboard status |
Every account's usage as text, and what's holding each back |
switchboard sessions |
Today's sessions, or one session in full |
switchboard requests |
The requests the router recorded |
switchboard history |
Your use by day and week: requests, tokens and worth |
switchboard events |
What the router decided and noticed |
switchboard accounts |
Lists accounts, adds, edits and removes them, and replaces tokens |
switchboard service |
Installs, restarts and checks the service that keeps the router running |
switchboard logs |
Shows and follows the logs |
Every command and flag is in Commands.
Switchboard reads ~/.config/switchboard/config.toml. setup and switchboard accounts write it for you, and you can edit it yourself:
[[account]]
id = "work"
label = "Work"
primary = true # the account your browser and the Claude apps are signed in to
[[account]]
id = "personal"
label = "Personal"
[prime]
day = "08:00-23:00" # your day: switchboard spreads the 5-hour resets over itEvery key is in Configuration.
- Dashboard: every page, its keys, and themes
- How it works: routing, what's recorded, the primary, reserves and priming
- Commands: every command and flag
- Configuration: every config key, tokens and notifications
- Reference: where switchboard keeps its files, their formats, and the JSON its commands print
- Troubleshooting: what to check first, and the logs
CLAUDE.md has the house rules, and docs/design.md the design. Every change passes the gates:
gofmt -l . # must print nothing
go vet ./...
scripts/test-isolated # every test, sandboxed, race detector on but for capture's
golangci-lint run ./...
go build ./...- Tests never touch the real system.
scripts/test-isolatedruns them in a macOS sandbox, andinternal/testguardfails any run that reaches the real network, home directory, config or binaries. - The pictures here are recorded from the real dashboard with every seam faked. demo/README.md says how to record them again.
MIT









