A fast and intuitive CLI tool to manage and switch between multiple Claude Code accounts.
- 🔄 Quick Account Switching: Switch between Claude Code accounts with a single command
- 👥 Multi-Account Management: Add, remove, and list your Claude Code accounts
- 🔒 Secure Storage: Uses system keychain (macOS) or encrypted files (Linux)
- ⚙️ Settings Preservation: Only switches authentication - your themes, settings, and preferences stay intact
- 🌍 Cross-Platform: Works seamlessly on macOS and Linux
- ⚡ Lightweight: Minimal dependencies, maximum performance
go install github.com/phathdt/claude-flip@latestDownload the latest release from GitHub Releases for your platform.
git clone https://github.com/phathdt/claude-flip.git
cd claude-flip
go build -o cflip
sudo mv cflip /usr/local/bin/- Log into Claude Code with your first account
- Add the account to claude-flip:
cflip add
- Switch to your second account in Claude Code and add it:
cflip add
- Start flipping between accounts:
cflip switch
# Add current Claude Code account to managed accounts
cflip add
# List all managed accounts (shows which one is active)
cflip list
# Switch to the next account in sequence
cflip switch
# Switch to a specific account by number or email
cflip switch 2
cflip switch user@example.com
# Remove an account from management
cflip remove user@example.com
# Show current active account
cflip current
# Display help
cflip help# Switch to account with confirmation prompt
cflip switch --confirm
# List accounts with detailed information
cflip list --verbose
# Force switch (skip safety checks)
cflip switch --force
# Add account with custom alias
cflip add --alias "work-account"Claude Flip only changes your authentication credentials while preserving everything else:
✅ What gets switched:
- Authentication tokens
- Account credentials
❌ What stays the same:
- Themes and UI preferences
- Settings and configurations
- Chat history
- Extensions and customizations
The tool safely stores your authentication data:
- macOS: Credentials in Keychain, OAuth info in
~/.claude-flip/ - Linux: Encrypted storage in
~/.claude-flip/with restricted permissions
- Claude Code: Must be installed and have logged in at least once
- Go: 1.19 or higher (for building from source)
The binary has no external dependencies - jq is not required as JSON processing is handled natively by Go.
- Make sure Claude Code is completely closed before switching
- Verify you have accounts added:
cflip list - Try restarting Claude Code after switching
- Ensure you have write permissions to your home directory
- On Linux, check file permissions:
ls -la ~/.claude-flip/
- Restart Claude Code completely (quit and reopen)
- Check current account:
cflip current
To remove claude-flip:
# If installed with go install
rm $(go env GOPATH)/bin/cflip
# If installed manually
sudo rm /usr/local/bin/cflip
# Clean up data
rm -rf ~/.claude-flipYour current Claude Code session will remain active.
- All credentials are stored securely using OS-native methods
- Authentication files use restricted permissions (600)
- No sensitive data is logged or transmitted
- Requires Claude Code to be closed during switches for safety
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE file for details.
- 🐛 Bug Reports: Open an issue
- 💡 Feature Requests: Start a discussion
- 📖 Documentation: Wiki
Made with ❤️ for the Claude Code community