claudectx 0.2.0

Launch Claude Code with different profiles
claudectx-0.2.0 is not a library.

claudectx

Launch Claude Code with different profiles

License Crates.io CI GitHub release GitHub stars


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

  1. Save: claudectx save work copies ~/.claude.json to ~/.claudectx/work.claude.json and symlinks ~/.claude.json to it
  2. Launch: claudectx work updates the ~/.claude.json symlink → profile, then launches claude

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@Workfg-work)
  • Zero config - Works out of the box

Sponsors

Interested in sponsoring? Get in touch


Quick Start

# 1. Install
brew install FGRibreau/tap/claudectx

# 2. Save your current account as a profile
claudectx save work

# 3. Launch Claude with the profile
claudectx work

Installation

macOS

# Homebrew (recommended)
brew install FGRibreau/tap/claudectx

# or with Cargo
cargo install claudectx

Linux

# Debian/Ubuntu (.deb)
curl -LO https://github.com/FGRibreau/claudectx/releases/latest/download/claudectx_0.1.0_amd64.deb
sudo dpkg -i claudectx_0.1.0_amd64.deb

# Cargo (all distros)
cargo install claudectx

# or download binary
curl -LO https://github.com/FGRibreau/claudectx/releases/latest/download/claudectx_linux_x86_64.tar.gz
tar -xzf claudectx_linux_x86_64.tar.gz
sudo mv claudectx /usr/local/bin/

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
git clone https://github.com/FGRibreau/claudectx.git
cd claudectx
cargo build --release
sudo cp target/release/claudectx /usr/local/bin/

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
claudectx work

# Launch with extra arguments
claudectx work -- --dangerously-skip-permissions

# Save current ~/.claude.json as "personal" profile
claudectx save personal

# Interactive selection then launch
claudectx

# List all profiles (* marks current)
claudectx list
# 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>:

  1. ~/.claude.json becomes a symlink → ~/.claudectx/<profile>.claude.json
  2. 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 Profilemy-work-profile
  • FG@Companyfg-company
  • Test Nametest-name

License

MIT


Like claudectx? Check out kubectx-rs for Kubernetes context switching