claudectx-0.2.0 is not a library.
claudectx
Launch Claude Code with different profiles
What is this?
claudectx manages multiple Claude Code profiles (Claude Max, Claude Team, personal) and launches Claude with the selected profile. Each profile is a complete claude.json config with its own account, MCP servers, and settings. Inspired by kubectx.
How it works
- Save:
claudectx save workcopies~/.claude.jsonto~/.claudectx/work.claude.jsonand symlinks~/.claude.jsonto it - Launch:
claudectx workupdates the~/.claude.jsonsymlink → profile, then launchesclaude
The symlink ensures Claude reads the correct account configuration.
Features
- Profile switching - Symlink-based switching for proper account isolation
- Direct launch - Launches Claude automatically after switching
- Save profiles - Store complete Claude configurations locally
- Quick switch - Interactive selection with arrow keys
- Pass-through args - Forward arguments to Claude:
claudectx work -- --dangerously-skip-permissions - Auto-slugify - Profile names are normalized (
FG@Work→fg-work) - Zero config - Works out of the box
Sponsors
Interested in sponsoring? Get in touch
Quick Start
# 1. Install
# 2. Save your current account as a profile
# 3. Launch Claude with the profile
Installation
macOS
# Homebrew (recommended)
# or with Cargo
Linux
# Debian/Ubuntu (.deb)
# Cargo (all distros)
# or download binary
Windows
# Chocolatey
choco install claudectx
# Scoop
scoop bucket add extras
scoop install claudectx
# or with Cargo
cargo install claudectx
All platforms
| Platform | Method | Command |
|---|---|---|
| macOS | Homebrew | brew install FGRibreau/tap/claudectx |
| macOS | Cargo | cargo install claudectx |
| Linux | Debian/Ubuntu | sudo dpkg -i claudectx_*_amd64.deb |
| Linux | Cargo | cargo install claudectx |
| Windows | Chocolatey | choco install claudectx |
| Windows | Scoop | scoop install claudectx |
| Windows | Cargo | cargo install claudectx |
| All | Binary | Download from Releases |
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | claudectx_linux_x86_64.tar.gz |
| Linux | x86_64 (static) | claudectx_linux_x86_64_musl.tar.gz |
| Linux | ARM64 | claudectx_linux_aarch64.tar.gz |
| Linux | ARM64 (static) | claudectx_linux_aarch64_musl.tar.gz |
| Linux | ARMv7 | claudectx_linux_armv7.tar.gz |
| Linux | x86_64 (.deb) | claudectx_*_amd64.deb |
| Linux | ARM64 (.deb) | claudectx_*_arm64.deb |
| macOS | Intel | claudectx_darwin_x86_64.tar.gz |
| macOS | Apple Silicon | claudectx_darwin_aarch64.tar.gz |
| Windows | x86_64 | claudectx_windows_x86_64.zip |
Usage
| Command | Description |
|---|---|
claudectx |
Interactive profile selection, then launch Claude |
claudectx <profile> |
Switch to profile and launch Claude |
claudectx <profile> -- <args> |
Launch Claude with profile and extra arguments |
claudectx list |
List all saved profiles (* marks current) |
claudectx save <name> |
Save current config as profile |
claudectx delete <name> |
Delete a profile |
Examples
# Launch Claude with "work" profile
# Launch with extra arguments
# Save current ~/.claude.json as "personal" profile
# Interactive selection then launch
# List all profiles (* marks current)
# Output:
# work - FG @ Company *
# personal - FG @ Personal
Configuration
Storage
Profiles are stored as individual JSON files in ~/.claudectx/:
~/.claudectx/
├── work.claude.json
├── personal.claude.json
└── side-project.claude.json
When you run claudectx <profile>:
~/.claude.jsonbecomes a symlink →~/.claudectx/<profile>.claude.json- Claude is launched and reads from the symlinked config
Each profile is a complete copy of ~/.claude.json, including:
- OAuth account (email, organization)
- MCP servers configuration
- Claude Code settings
- API keys
Profile Names
Profile names are automatically slugified:
My Work Profile→my-work-profileFG@Company→fg-companyTest Name→test-name
License
Like claudectx? Check out kubectx-rs for Kubernetes context switching