https://github.com/felipeadeildo/claude-code-profiles
Manage multiple Claude Code profiles: switch accounts, providers, and env vars with one command
https://github.com/felipeadeildo/claude-code-profiles
bash-script claude claude-ai claude-code
Last synced: 12 days ago
JSON representation
Manage multiple Claude Code profiles: switch accounts, providers, and env vars with one command
- Host: GitHub
- URL: https://github.com/felipeadeildo/claude-code-profiles
- Owner: felipeadeildo
- License: apache-2.0
- Created: 2026-04-20T19:50:10.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-01T16:21:28.000Z (23 days ago)
- Last Synced: 2026-06-01T16:25:41.799Z (23 days ago)
- Topics: bash-script, claude, claude-ai, claude-code
- Language: Shell
- Homepage:
- Size: 707 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ccp: Claude Code Profiles
Switch between Claude Code setups with a single command.
Different accounts, different providers, different models — each in its own profile.
No dependencies. Works with bash, zsh, and fish.
[](https://github.com/felipeadeildo/claude-code-profiles/releases/latest)
[](LICENSE)
---
## Install
```bash
curl -fsSL https://ccp.fa.dev.br/install.sh | bash
```
Then reload your shell:
| Shell | Command |
|-------|---------|
| bash | `source ~/.bashrc` |
| zsh | `source ~/.zshrc` |
| fish | `source ~/.config/fish/conf.d/ccp.fish` |
The installer detects your shell automatically. For fish, it installs a native `ccp.fish` function to `~/.config/fish/conf.d/` — no need to source anything on the next shell launch.
## Quickstart
```bash
ccp new work # create a profile (interactive wizard)
ccp work # launch claude with that profile
ccp use work # export its vars into your current shell
```
## How it works
A profile is a `.env` file under `~/.ccp/profiles/`. Each profile gets an isolated `CLAUDE_CONFIG_DIR` — separate settings, history, and todos per profile.
```
~/.ccp/
profiles/
work.env
personal.env
openrouter.env
config # stores the default profile name
data/ # isolated CLAUDE_CONFIG_DIR per profile
```
Example profile:
```bash
# ~/.ccp/profiles/work.env
CLAUDE_CONFIG_DIR=~/.ccp/data/work
ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_API_KEY=sk-or-...
```
## Commands
```
ccp list list all profiles
ccp new create a profile (interactive)
ccp show show vars (keys masked)
ccp edit open in $EDITOR
ccp remove delete a profile
ccp [] [flags] launch claude (with optional profile and claude flags)
ccp use export vars into current shell
ccp run run any command with profile vars
ccp default [profile] get or set the default profile
ccp doctor validate all profiles
ccp version show current version
ccp update update to the latest release
```
**Shorthand**: `ccp work --resume` launches claude with the `work` profile and passes `--resume` directly to claude. Bare `ccp` uses the default profile.
**`ccp use` vs `ccp `**: use `ccp use` when you want vars to persist in your shell session. The shorthand spawns a subprocess — vars are scoped to that invocation only.
## Providers
| Provider | `ANTHROPIC_BASE_URL` | Auth var |
|----------------|------------------------------------------|-------------------------------|
| Anthropic | *(leave blank)* | `ANTHROPIC_API_KEY` |
| OpenRouter | `https://openrouter.ai/api` | `ANTHROPIC_API_KEY` |
| z.ai (GLM) | `https://api.z.ai/api/anthropic` | `ANTHROPIC_AUTH_TOKEN` |
| Kimi | `https://api.moonshot.ai/anthropic` | `ANTHROPIC_AUTH_TOKEN` |
| DeepSeek | `https://api.deepseek.com/anthropic` | `ANTHROPIC_AUTH_TOKEN` |
| Ollama (local) | `http://localhost:11434` | `ANTHROPIC_AUTH_TOKEN=ollama` |
The interactive wizard sets the right auth variable automatically.
## Model mapping
Claude Code internally requests `claude-opus`, `claude-sonnet`, etc. If your provider uses different model names, map them in the profile:
```bash
ANTHROPIC_DEFAULT_OPUS_MODEL=glm-4.6
ANTHROPIC_DEFAULT_SONNET_MODEL=glm-4.6
ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.5-air
```
The wizard asks for these optionally when creating a profile.
## Updating
```bash
ccp update # downloads and installs the latest release
ccp version # show current version
```
ccp checks for updates in the background and notifies you when a new version is available.
---
*Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md).*