Switch between complete setups for your AI coding agents, the way AWS_PROFILE switches AWS accounts.
Works with Claude Code, Codex CLI and Gemini CLI. One bash script, no dependencies.
$ agman use work # every new session now uses your work setup
$ agman use personal # ...and now your personal oneA profile is everything your agent is in one context: CLAUDE.md, settings, rules, skills,
agents, plugins, MCP servers and, if you want, its own account.
- No shell setup. Switching applies to every new session on the machine, IDE extensions included.
- Nothing lost.
claude --resumeworks across profiles, andagman offrestores your original configs exactly. - Safe. Your originals are backed up first, and agman never touches files it didn't create.
brew install memandip/agman/agmanOther ways to install
# One-line installer
curl -fsSL https://raw.githubusercontent.com/memandip/agman/main/install.sh | bash
# From a clone
git clone https://github.com/memandip/agman.git && cd agman && ./install.shAfter the first brew install, the short name works: brew upgrade agman. To use the short
name from the start, run brew tap memandip/agman && brew trust memandip/agman first.
Update with agman update (or brew upgrade agman).
$ agman create work --copy-current # copy your current setup into a 'work' profile
$ agman create personal # or start an empty one
$ agman use work
Switched to profile 'work' (tools: claude codex gemini).
Your original configs were backed up as the 'global' profile.
$ agman use # no name: pick from a menu with ↑/↓ and Enter
$ agman current # which profile is active?
$ agman off # stop and restore your original configs| Command | What it does |
|---|---|
agman list |
Show your profiles (also ls, --list) |
agman current |
Show the active profile |
agman use [name] |
Switch to a profile; with no name, pick from a menu |
agman off |
Stop switching and restore your original configs |
agman create <name> |
New profile. --copy-current copies your setup, --from <name> copies a profile |
agman rename <old> <new> |
Rename a profile |
agman remove <name> |
Delete a profile (also rm; never the active one) |
agman login <name> |
Give a profile its own Claude account (guide) |
agman run [name] |
Start claude once with a profile, without switching (guide) |
agman doctor |
Check your setup for problems |
agman cloud … |
Sync profiles between machines (guide) |
agman stealth … |
Block company telemetry, per profile (guide) |
Run agman help for the full list, or agman <command> --help for one command.
Each profile is a folder under ~/.agman/<name>. agman use points each tool's config path
at that folder, so switching is instant and needs no shell setup.
Show details
~/.claude -> ~/.agman/work/claude/
~/.claude.json -> ~/.agman/work/claude.json
~/.codex -> ~/.agman/work/codex/
~/.gemini -> ~/.agman/work/gemini/
- The first switch moves your original configs into a profile called
global. - Sessions and history are shared across profiles, so
claude --resumealways works (details). - Your login is shared by default, so switching never logs you out (details).
- Only tools you have are managed. Limit them with
AGMAN_TOOLS="claude codex". - Sessions already running keep their config; switching affects new sessions.
- agman skips any config link it didn't create (for example from a dotfiles manager) and won't delete the active profile.
Why links instead of environment variables? Gemini CLI has no way to change its config folder, and IDE extensions don't see shell variables. Links work everywhere.
| Guide | Read it when you want to… |
|---|---|
| Sessions and history | understand what's shared, or keep history separate per profile |
| Accounts and login | use a different Claude account per profile |
| Per-project and per-shell profiles | pick a profile per repo, or run two profiles side by side |
| Cloud sync | sync profiles between machines or with a team |
| Stealth | block company telemetry, per profile |
- Windows: needs symlink support. Use WSL, or Git Bash with Developer Mode on.
- Profile folders are sensitive. They can hold credentials and MCP tokens.
- Optional tools:
curlforupdateandcloud;jqorpython3makes profile creation cleaner. Everything else is plain bash. CLAUDE_CONFIG_DIR, used byrun,envand the shell hook, works in Claude Code but isn't officially documented (#33430). Normal switching doesn't rely on it.
bash tests/run.sh # sandboxed: fake HOME and a stub claude, safe to run anywhereCI runs the tests on Ubuntu and macOS and checks the scripts with shellcheck. See design notes and the roadmap.
Planned: sharing profiles through a git repository, Qwen Code and Kimi CLI support, fish
shell support, tab completion, and --fresh-auth (create a profile without copying your login).
MIT