A field tool for Claude Code
One account per terminal, switched with a keystroke
Personal in one terminal, work in another, a client in a third, all signed in at the same time. Switching takes one command. Your current login is already the defaultprofile, so there's nothing to set up.
$ ccenv list ● default johndoe@gmail.com max work me@company.com team client not signed in ● = active in this shell
The problem
Switching accounts meant logging out, which clobbers the one login you had.
Claude Code keeps one active login. Add a work account or a client and you're signing in and out all day, losing the session you were in. ccenv makes accounts concurrent, not just switchable: every terminal stays on its own account, with no interference.
What it does
Two terminals. Two live accounts. Zero clobbering.
A · Per-shell isolation
Each terminal is its own account.
use changes only the current shell. run scopes a single session and leaves the shell untouched after.
Each profile keeps its own credential-store entry. Sessions running side by side never touch each other's tokens.
B · Credential handling
Tokens stay in the OS keychain.
ccenv doesn't store secrets. Tokens live in macOS Keychain (or a per-profile credentials file on Linux and Windows), managed by Claude Code through claude auth.
~/.ccenv is 0700, config copies are 0600. Nothing phones home, nothing lands in a flat file.
$ ccenv use work $ claude # runs as work
$ ccenv use default $ claude # runs as personal
$ ccenv run client \ -- -p "summarize this repo" # shell untouched
How it works
One config dir per account. That's the whole trick.
- i
Each profile gets its own config directory; ccenv points Claude Code at it through the CLAUDE_CONFIG_DIR environment variable.
- ii
Because Claude Code keys credentials by config dir, two terminals on two profiles are two fully live accounts, with no clobbering.
- iii
Your plugins, skills, commands, hooks and CLAUDE.md are symlinked into every profile; mutable config is copied so concurrent accounts never race.
- iv
Your existing ~/.claude is the default profile. There's nothing to migrate.
Reference
A small CLI you'll remember.
| ccenv use <name> | Rebind the current shell to an account (needs shell integration). |
| ccenv run <name> | Launch a one-off session on an account. |
| ccenv list | Show every profile; ● marks the active shell. |
| ccenv current | Print the account this shell is on. |
| ccenv create <name> | Make a new profile; it inherits your setup. |
| ccenv login <name> | Sign a profile in via claude auth. |
| ccenv sync <name> | Re-copy settings.json / mcp_config.json and re-link any missing shared assets. |
| ccenv doctor | Health-check the CLI, credential store and integration. |
| ccenv rename <a> <b> | Rename a profile (guarded). |
| ccenv remove <name> | Delete a profile (guarded; refuses default). |
| ccenv update | Fetch the latest build from ccenv.dev and swap it in. |
| ccenv uninstall | Remove ccenv itself; --purge also deletes every profile. |
use and unuse run through the shell integration the installer adds to your rc; open a new terminal (or re-source it) once after installing. ccenv help full prints the complete reference, including create options like --isolated and --no-login.
Security
It holds none of your secrets.
Stores zero secrets
Auth is delegated entirely to claude auth. Tokens stay in the OS credential store; ccenv never reads, writes or holds them.
Guarded removal
A profile path must be a real directory under $HOME, with no .. and no symlinks, before anything is deleted. default is never removable.
Injection-safe setup
Shell-rc edits are upserted atomically and profile names are restricted. Implementation: rc lines are built with printf %q; new dirs are created 0700, files 0600.
Tells you what's wrong
doctor checks the claude CLI, the credential store, shell integration, per-profile sign-in and broken links.
Install
One line. Done.
Your current login becomes the default profile automatically. Create a second profile, open another terminal, and both accounts run side by side.
$ curl -fsSL https://ccenv.dev/install.sh | bashNo clone, no build step. Needs Claude Code and curl on your PATH. macOS, Linux, Windows via Git Bash or WSL. Per-user, no sudo; re-run any time to update.