claudectx

Crates.ioclaudectx
lib.rsclaudectx
version0.1.0
created_at2026-01-15 12:21:31.675505+00
updated_at2026-01-15 12:21:31.675505+00
descriptionLaunch Claude Code with different profiles
homepagehttps://github.com/FGRibreau/claudectx
repositoryhttps://github.com/FGRibreau/claudectx
max_upload_size
id2045461
size134,723
Francois-Guillaume Ribreau (FGRibreau)

documentation

https://docs.rs/claudectx

README

claudectx

Launch Claude Code with different profiles


claudectx demo

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
  2. Launch: claudectx work switches ~/.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

Natalia
Natalia

24/7 AI voice and whatsapp agent for customer services
NoBullshitConseil
NoBullshitConseil

360° tech consulting
Hook0
Hook0

Open-Source Webhooks-as-a-Service
France-Nuage
France-Nuage

Sovereign cloud hosting in France

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
Available binaries
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
Manual installation from source
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

Commit count: 0

cargo fmt