← 全部工具

uwuclxdy/clauth

AI Agent
热度 75 更新于 开发与构建

Claude Code account switcher, real-time usage monitor with a CLI, TUI and MCP

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

<p align="center" <img src="media/clauth.png" alt="clauth: Claude Code account switcher and usage monitor TUI" width="480" / </p

<h1 align="center"Claude Code multi-account manager & MCP Plugin</h1

<p align="center" <img src="https://cov.uwuclxdy.dev/badges/uwuclxdy/clauth/coverage.svg" alt="coverage" / <img src="https://cov.uwuclxdy.dev/badges/uwuclxdy/clauth/ratio.svg" alt="code to test ratio" / <img src="https://cov.uwuclxdy.dev/badges/uwuclxdy/clauth/time.svg" alt="test execution time" / </p

<p align="center" <a href="https://github.com/uwuclxdy/clauth/actions/workflows/release.yml"<img src="https://github.com/uwuclxdy/clauth/actions/workflows/release.yml/badge.svg" alt="Release build status" /</a <a href="https://crates.io/crates/clauth"<img src="https://shields.uwuclxdy.dev/github/v/release/uwuclxdy/clauth?sort=semver&logo=rust&label=version&color=orange" alt="latest version" /</a <a href="https://github.com/uwuclxdy/clauth/releases"<img src="https://shields.uwuclxdy.dev/github/downloads/uwuclxdy/clauth/total?label=downloads&color=blue" alt="GitHub release downloads" /</a <img src="https://shields.uwuclxdy.dev/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-2b90d9" alt="Linux, macOS, Windows" / <a href="LICENSE"<img src="https://shields.uwuclxdy.dev/badge/license-MIT-green" alt="MIT license" /</a </p

<p align="center" <a href="#features"Features</a · <a href="#how-it-works"How it works</a · <a href="#install"Install</a · <a href="#quickstart"Quickstart</a · <a href="#claude-code-plugin"Plugin</a · <a href="#alternatives"Alternatives</a · <a href="#faq"FAQ</a · <a href="https://github.com/uwuclxdy/clauth/wiki"Wiki</a </p

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.

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. Opted-in accounts queue their auto-start, opening 5h windows 5h / accounts apart instead of all at once
  • 🧩 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, and tells a session when the account behind it changed
  • 🖥️ Headless: clauth daemon runs the refresh and auto-switch loop with no TUI and publishes status.json for a menu-bar app to read, or serves that feed, the account switch, the herdr panes with their terminal streams, Claude Code session history, and prompts and key presses into a pane to another machine over HTTPS with --listen
  • 🔀 Codex too: adopt or mint a ChatGPT login as a codex profile, run codex under it in its own CODEXHOME, and let a separate codex chain rotate accounts between sessions (Codex)
  • 🛠️ Quality-of-life: browse and resume past sessions under any account, per-profile model routing, start --auto to pick the account by the models a session will run, 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.

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