RepositoryRust
uwuclxdy

uwuclxdy/clauth

Claude Code multi-account manager, usage monitor (CLI, TUI & cross-account delegation via MCP)

353stars
53forks
23issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: ratatui

#1 Repository of the week

1
TINIX TRENDING·Topic: account-switcher

#1 Repository of the week

1
TINIX TRENDING·Topic: vibecoded

#1 Repository of the week

clauth: Claude Code account switcher and usage monitor TUI

Claude Code multi-account manager & MCP Plugin

Release build status latest version GitHub release downloads Linux, macOS, Windows MIT license

Features · How it works · Install · Quickstart · Plugin · Alternatives · FAQ · Wiki

Juggle every Claude Code account from one terminal: switch in a keypress, track live 5h / 7d usage, auto-switch before a limit stops you, even hand a task to another account from inside Claude.

Most account tools do one half. clauth pairs instant switching between multiple Claude Code accounts with a live usage monitor, then wires the two together so a fallback chain moves you off an exhausted account before Claude Code ever blocks. Works with Claude Pro, Max, Team, Enterprise OAuth accounts or any custom API endpoint. Linux, macOS, Windows.

clauth TUI demo: switching Claude Code accounts with live usage bars

Font is kinda off on the recording, I promise it looks better than this.

Features

  • 🔄 Switch accounts in one keypress or clauth <name>: OAuth (Pro / Max / Team / Enterprise) or a custom API endpoint, plan tier detected for you
  • 📊 Monitor live 5h / 7d rate-limit bars, a global token dashboard with API-equivalent cost, plus a live Claude status-incident feed
  • 🤖 Auto-switch down a fallback chain the moment an account hits its limit, with weekly-window and spend-ceiling gates so a long run never stalls and never surprises you with a bill
  • 🧩 Run in parallel: several accounts at once in isolated config dirs, or a clean headless session with none of your global memory, plugins, or hooks
  • 🔌 From inside Claude: an MCP plugin lets a live session list, switch, or delegate a whole prompt (even headless) to another account
  • 🖥️ Headless: clauth daemon runs the refresh and auto-switch loop with no TUI and publishes status.json for a menu-bar app to read
  • 🛠️ Quality-of-life: browse and resume past sessions under any account, per-profile model routing, shell completions, signed self-updates, multi-instance safe

Full reference: the wiki.

How it works

Claude Code stores its session in ~/.claude/.credentials.json (OAuth tokens) and the env block of ~/.claude/settings.json (base URL, API key). clauth keeps a per-profile snapshot of both. A switch swaps those two in place and leaves the rest of ~/.claude/ untouched. clauth start takes a different route: it launches claude against a temporary ~/.claude mirror, so several accounts run at once.

flowchart LR
    P["profiles in<br/>~/.clauth"]
    P -->|"clauth work"| S["swap ~/.claude<br/>credentials + env, in place"]
    P -->|"clauth start work"| I["launch claude in an<br/>isolated config dir"]
    ANT["Anthropic<br/>(api + platform)"] -. "poll usage, refresh tokens" .-> P
    P -. "auto-switch at your limit" .-> P

Install

Linux, macOS, Windows (Git Bash / MSYS2).

cargo install clauth
# no Rust toolchain needed; --nocargo forces a binary download
curl -fsSL https://raw.githubusercontent.com/uwuclxdy/clauth/mommy/install.sh | bash

Binary installs update themselves in the background, checksum and signature verified before anything is replaced; CLAUTH_NO_UPDATE=1 turns that off. Cargo installs upgrade with cargo install clauth. On first launch clauth offers to install shell completions, asking before it touches your shell rc. More: Install.

Quickstart

Capture your current Claude Code session as a profile:

clauth
# Select "+ new from current profile", enter a name, e.g. "work"

Repeat while logged in to a different account, then switch in the TUI (⏎ + confirm) or directly by name:

clauth work
# switched to 'work'

Run claude under a profile without touching the global config:

clauth start personal -- --model haiku
# spawns claude with personal's credentials in a per-profile CLAUDE_CONFIG_DIR

For a clean, blind session (auth only, no global memory, plugins, or hooks):

clauth start --isolated personal -p < prompt.txt
# pass the prompt on stdin: a variadic claude flag (e.g. --disallowedTools a,b,c)
# would otherwise swallow a trailing positional prompt forwarded through clauth
CommandDoes
clauthopen the TUI
clauth <profile>switch and exit
clauth start <profile>run claude under that account, in its own config dir
clauth login <profile>add or re-authenticate an account, browser or API key
clauth list / clauth whichaccount table with cached usage / who owns this session
clauth sessions, resume, infobrowse past Claude Code sessions and resume one anywhere
clauth daemonheadless refresh + auto-switch loop

Every command and flag: Quickstart.

The active profile shows in orange. Usage bars are cached locally, so they stay on screen even when the Anthropic API is rate-limited or offline. ← → move between the eight tabs, ? lists the keys for the tab you are on.

TabWhat it holds
Overviewswitch and reorder accounts
Usageper-account window breakdown
Tokensglobal Claude Code token stats + API-equivalent cost across all models
Setupendpoint, key, env, auto-start, per-profile model routing
Fallbackchain editor
Configappearance, scheduler, auto-switch defaults
StatusClaude incident feed
PluginClaude Code wiring + per-profile runtime, with one-key fixes

Claude Code plugin

clauth ships a plugin that exposes your profiles to a live Claude Code session via MCP:

/plugin marketplace add uwuclxdy/clauth
/plugin install clauth@clauth
ToolWhat it doesQuota
list_profilesevery profile with cached 5h/7d usage, provider, tier, live-session flag, observed throughputzero (disk cache)
whichwhich profile owns the current sessionzero (filesystem)
switchrelink the global active profilezero
delegatehand a headless prompt to another account and return the answer (or a job_id)real usage window on the target account
delegate_resultfetch a backgrounded delegate's resultzero (filesystem)

delegate fields, kill and resume rules, the manual mcpServers entry: Claude Code plugin.

Alternatives

clauth is the only one of these that pairs account switching with a live usage monitor and ties them together with an auto-switch chain, in a single TUI.

ToolWhat it doesCompared to clauth
claude-swapCLI account switcher (token backup/restore)no usage view, no auto-switch
CCSwitcher, claude-account-switchermacOS menu-bar switchersmacOS-only, no fallback chain
cc-account-switchercredential-swap scriptsno TUI, no usage
Claude-Code-Usage-Monitorreal-time usage monitor with predictionsmonitoring only, single account
claude-code-statuslinerate-limit status line inside Claude Codein-session display, no switching
CLAUDE_CONFIG_DIR by handmanual per-account config dirswhat clauth start automates

FAQ

How do I switch between multiple Claude Code accounts without logging out? Install clauth, save each logged-in session as a profile once, then switch with clauth <name> or a single keypress in the TUI. No browser, no re-login.

Can I run Claude Code with multiple accounts at the same time? Yes. clauth start <profile> launches claude in an isolated CLAUDE_CONFIG_DIR, so parallel sessions don't share identity, settings, or billing caches.

How do I run Claude Code without my global CLAUDE.md, plugins, or hooks? clauth start --isolated <profile> keeps the account's auth but drops your operator memory, plugins, and hooks, leaving a clean session for headless work or blind evals. The MCP delegate tool takes isolated: true for the same thing.

Can Claude Code switch accounts automatically when I hit the 5-hour limit? Yes: put accounts in the fallback chain and clauth switches to the next member with headroom the moment the active one crosses its threshold. It runs in the TUI or headless via clauth daemon.

Is there a Claude Code MCP server / plugin to switch accounts from inside a chat? Yes. clauth ships a plugin that runs as an MCP server (clauth mcp), so a live session can list_profiles, which, switch, or delegate a headless prompt to another account without leaving the chat.

How do I monitor Claude Code usage and rate limits? The Overview tab shows color-coded 5h (and 7-day) bars per account with reset times; the Usage tab breaks down every rate-limit window the API reports; the Tokens tab adds a global token dashboard with API-equivalent cost.

Does it work with Claude Pro, Max, Team, and Enterprise? Yes. OAuth profiles cover all paid tiers (plan auto-detected, including Max 5x / 20x). API-endpoint profiles cover the Anthropic API or any compatible proxy.

Where does clauth store my Claude Code credentials? Locally under ~/.clauth/, with 0600 permissions on Unix. Tokens only ever go to Anthropic. See SECURITY.md.

More, including what to check when something misbehaves: FAQ.

Documentation

PageCovers
Installevery install path, update verification, completions
Quickstartfirst run, every command, flag, and env var
Interface and keysthe eight tabs, every keybinding, the action menus
Configurationboth TOML files key by key, model routing, storage layout
Auto-switchthresholds, exclusion rules, burn-aware mode, spend ceilings
Daemonclauth daemon and the status.json read contract
Claude Code pluginthe MCP server and delegate in full
Tokens and costwhere the dashboard reads from, what the cost figure means
Securitywhere credentials live and how they move

Development

cargo build --release
cargo clippy --all-targets   # CI gates clippy -D warnings + fmt --check + test on every push
cargo test

[!TIP] cargo test showcase -- --ignored --nocapture drives the real interactive TUI on fake data against a throwaway home dir (no network, never compiled into the binary). Handy for screenshots.

Security

clauth handles live OAuth tokens and replaces its own binary over the network, so SECURITY.md lays out the trust model: where credentials live, every host clauth contacts, how updates get verified, and how to switch each behavior off. Found something exploitable? Report it privately through the repo's Security → Report a vulnerability.

License

MIT

Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

315.1k
Dec 1, 2026
RepositoryPython
NousResearch/hermes-agent

The agent that grows with you

267.7k
Dec 2, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryGo
JuliusBrussee/caveman

why use many token when few token do trick. Skill + local proxy for coding agents: shorter answers, smaller tool output, every original recoverable.

124.4k
Dec 1, 2026
RepositoryTypeScript
thedotmack/claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

121.3k
Dec 2, 2026
RepositoryJavaScript
DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

203.5k
Nov 22, 2026
RepositoryPython
nextlevelbuilder/ui-ux-pro-max-skill

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

157.4k
Dec 2, 2026
RepositoryRust
rtk-ai/rtk

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

88.5k
Dec 2, 2026
RepositoryTypeScript
cheaper-inference/OmniRoute

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

91.8k
Dec 2, 2026