claudeorch

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT

README ΒΆ

claudeorch

A command-line account switcher for Claude Code. Save multiple Anthropic logins, swap between them in one command, or run them in parallel terminals β€” without re-authenticating through the browser.

GitHub release Go Report Card Platforms

curl -fsSL https://raw.githubusercontent.com/DhilipBinny/claudeorch/main/install.sh | sh

What it does

Claude Code authenticates one Anthropic account at a time. With two Max subscriptions or multiple orgs, you end up cycling through claude /logout β†’ browser OAuth β†’ claude /login every time you switch.

claudeorch saves named profiles and gives you:

  • πŸ” Instant switching β€” claudeorch swap work, no browser.
  • πŸͺŸ Parallel sessions β€” claudeorch launch home in a separate terminal runs alongside without conflict.
  • πŸ“Š Live usage β€” 5H + 7D quota bars per account, straight from Anthropic's usage API.
  • πŸ”’ Safe by default β€” atomic writes, session-aware gates, strict permissions, zero telemetry.
$ claudeorch status
Active profile: work (alice@example.com)
  5H  β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  29%  resets 12m
  7D  β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   9%  resets 6d4h

Sessions: 1 running
  terminal  pid=12345  profile=work  cwd=/home/alice/project

1 other profile. Run 'claudeorch list' for all usage.

Install

One-liner (Linux + macOS):

curl -fsSL https://raw.githubusercontent.com/DhilipBinny/claudeorch/main/install.sh | sh

Detects your OS + CPU, downloads the matching binary from the latest release, SHA-256 verifies it, and installs to ~/.local/bin/claudeorch.

Once installed, update with claudeorch upgrade.

Alternatives: go install github.com/DhilipBinny/claudeorch/cmd/claudeorch@latest, or clone + go build.


Quick start

# You're logged into Claude Code as account A (e.g. work).
# Save it FIRST β€” before logging out, or the tokens vanish.
claudeorch add work

# Now switch safely.
claude /logout
claude /login                     # as account B (home)
claudeorch add home

# From here on, switching is one command:
claudeorch swap home              # live ~/.claude/ now = home
claudeorch swap work              # back to work

# Or run both in parallel, one per terminal:
claudeorch launch work    # terminal A
claudeorch launch home    # terminal B

Golden rule: always claudeorch add before claude /logout. Logging out deletes the local tokens.


Commands

add, list, status, swap, launch, refresh, rename, remove, doctor, statusline, upgrade, purge, uninstall.

Run claudeorch <command> --help for flags, or see the full commands reference.


FAQ

Will this get my account banned? No. claudeorch only reads and writes the same files Claude Code writes, using Anthropic's own OAuth refresh endpoint. It's not a proxy, not a wrapper, not a scraper.

Does it support Windows? Not yet. Linux and macOS today; Windows is planned. Use WSL2 in the meantime.

Does it work with Claude API keys? No β€” this is for Claude Code's OAuth flow. Plain API keys use environment variables.


Documentation

  • Commands reference β€” every subcommand, flag, and exit code
  • Architecture β€” how the atomic swap, isolation, and OAuth refresh actually work
  • Security β€” threat model, crypto choices, vulnerability reporting

Contributing


Disclaimer

claudeorch is a third-party tool. It is not affiliated with, endorsed by, or sponsored by Anthropic. It interoperates with Claude Code's on-disk file formats and OAuth endpoints and may break if Anthropic changes either β€” fixes land quickly when that happens.

License

MIT Β© 2026 Dhilip Binny

Directories ΒΆ

Path Synopsis
cmd
claudeorch command
Package main is the entrypoint for the claudeorch CLI.
Package main is the entrypoint for the claudeorch CLI.
internal
creds
Package creds provides a platform-aware interface for reading and writing Claude Code's "live" OAuth credentials β€” the ones Claude itself actively uses and rotates.
Package creds provides a platform-aware interface for reading and writing Claude Code's "live" OAuth credentials β€” the ones Claude itself actively uses and rotates.
fsio
Package fsio provides atomic file writes, POSIX file locks, and permission enforcement helpers used throughout claudeorch for credential-safe I/O.
Package fsio provides atomic file writes, POSIX file locks, and permission enforcement helpers used throughout claudeorch for credential-safe I/O.
launch
Package launch handles creation of per-profile isolate directories and exec-ing into Claude Code with the right CLAUDE_CONFIG_DIR.
Package launch handles creation of per-profile isolate directories and exec-ing into Claude Code with the right CLAUDE_CONFIG_DIR.
log
Package log provides structured logging with built-in credential redaction.
Package log provides structured logging with built-in credential redaction.
migrate
Package migrate discovers and migrates Claude Code sessions between project directories.
Package migrate discovers and migrates Claude Code sessions between project directories.
oauth
Package oauth handles token refresh for saved profiles.
Package oauth handles token refresh for saved profiles.
paths
Package paths resolves filesystem locations for Claude Code and claudeorch.
Package paths resolves filesystem locations for Claude Code and claudeorch.
profile
Package profile defines the Profile type β€” claudeorch's saved representation of a Claude Code account β€” and the Store that indexes them.
Package profile defines the Profile type β€” claudeorch's saved representation of a Claude Code account β€” and the Store that indexes them.
reconcile
Package reconcile implements the freshest-wins sync pass that keeps profile credentials current when Claude Code silently rotates tokens via OAuth 2.0 refresh-token rotation.
Package reconcile implements the freshest-wins sync pass that keeps profile credentials current when Claude Code silently rotates tokens via OAuth 2.0 refresh-token rotation.
schema
Package schema provides narrow parsers for Claude Code's on-disk file formats: .credentials.json and .claude.json.
Package schema provides narrow parsers for Claude Code's on-disk file formats: .credentials.json and .claude.json.
session
Package session detects running Claude Code instances by reading PID files from the active config directory.
Package session detects running Claude Code instances by reading PID files from the active config directory.
swap
Package swap implements the two-file atomic account swap:
Package swap implements the two-file atomic account swap:
ui
Package ui provides terminal rendering helpers for claudeorch output: colored usage bars, profile tables, and ANSI/no-color detection.
Package ui provides terminal rendering helpers for claudeorch output: colored usage bars, profile tables, and ANSI/no-color detection.
usage
Package usage fetches per-account API usage from Anthropic's usage endpoint.
Package usage fetches per-account API usage from Anthropic's usage endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL