cc-profiles
v0.1.1
Published
Manage multiple Claude Code profiles with shared configuration
Maintainers
Readme
cc-profiles
CLI tool for managing multiple Claude Code profiles with shared configuration and isolated authentication.
Features
- Create profiles - Set up isolated Claude Code profiles with automatic symlinks to shared configuration
- Managed shell aliases - Automatically generates and updates shell functions for each profile
- List profiles - Display all profiles with authentication status
- Remove profiles - Clean up profiles and automatically remove shell aliases
- Interactive UI - Beautiful terminal interface using @clack/prompts
- Multi-shell support - Works with zsh, bash, and fish
Installation
npm install -g cc-profilesOr use directly with npx:
npx cc-profilesPrerequisites
Claude Code must be installed and configured before using cc-profiles:
npm install -g @anthropic-ai/claude-code
claude # Run once to set up configurationUsage
Interactive Mode
Run without arguments to open the interactive menu:
cc-profilesCommands
# Create a new profile
cc-profiles create work
cc-profiles create personal
# List all profiles
cc-profiles list
cc-profiles ls
# Remove a profile
cc-profiles remove work
cc-profiles rm personalHow It Works
Profile Creation
When you create a profile, cc-profiles:
- Creates a new directory
~/.claude-{name}/ - Creates symlinks to shared configuration files:
settings.json- Your Claude Code settingsCLAUDE.md- Your custom instructionsagents/- Custom agentscommands/- Custom commandsplugins/- Installed plugins
- Automatically updates the shell aliases file
- (First time) Offers to set up shell integration
Managed Shell Aliases
cc-profiles uses a managed aliases file approach:
~/.zshrc (modified once)
├── ... your existing config ...
└── # cc-profiles shell integration
[ -f ~/.cc-profiles-aliases.sh ] && source ~/.cc-profiles-aliases.sh
~/.cc-profiles-aliases.sh (auto-generated)
├── work() { ... }
├── personal() { ... }
└── cc-list() { ... }How it works:
| Action | What happens |
|--------|--------------|
| First cc-profiles create | Adds source line to .zshrc (once) |
| cc-profiles create foo | Regenerates aliases file with new function |
| cc-profiles remove foo | Regenerates aliases file without that function |
| Open new terminal | All aliases are available automatically |
Shell Support
| Shell | Config File | Aliases File | Integration |
|-------|-------------|--------------|-------------|
| zsh | ~/.zshrc | ~/.cc-profiles-aliases.sh | Adds source line |
| bash (macOS) | ~/.bash_profile | ~/.cc-profiles-aliases.sh | Adds source line |
| bash (Linux) | ~/.bashrc | ~/.cc-profiles-aliases.sh | Adds source line |
| fish | Auto-loads | ~/.config/fish/functions/cc-profiles.fish | No config needed |
Using Profiles
After creating a profile:
# Open a new terminal, or reload your shell config
source ~/.zshrc
# Start Claude with your profile
work
# First time? Authenticate inside Claude
/login
# List all available profiles
cc-listConfiguration Sharing
All profiles share:
- Settings (
settings.json) - Custom instructions (
CLAUDE.md) - Agents, commands, and plugins
Each profile has isolated:
- Authentication credentials (
~/.claude-{name}.json) - Session history
- Conversation context
File Locations
| File | Purpose |
|------|---------|
| ~/.cc-profiles.json | Profile metadata |
| ~/.cc-profiles-aliases.sh | Shell functions (auto-managed) |
| ~/.claude-{name}/ | Profile config directory |
| ~/.claude-{name}.json | Profile credentials |
Requirements
- Node.js 20.0.0 or higher
- Claude Code installed and configured
Development
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.js
# Watch mode
npm run dev
# Lint
npm run lint
# Test
npm testLicense
MIT
