Switch between complete work and personal setups for your AI coding agents, the way
AWS_PROFILE switches AWS accounts. One command swaps instructions, skills,
agents, MCP servers, and settings across Claude Code, Codex, and Gemini.
# one profile per context, seeded however you like $ agman create personal $ agman create work --copy-current $ agman use work Switched to profile 'work' (tools: claude codex gemini). Seeded this profile with your current Claude account (no re-login needed). Your original configs were backed up as the 'global' profile. New sessions everywhere (including IDEs) now use this profile. $ claude # work rules, work skills, work MCP servers $ agman use personal # and back, instantly $ agman off # restore your original setup entirely
Claude Code layers a single ~/.claude into every project: your instructions,
skills, subagents, plugins, and MCP servers apply everywhere. Codex and Gemini do the same
with their own directories. That is fine until your office work and your personal projects
want different rules โ or a different account.
A project CLAUDE.md layers on top of your global one; it never
replaces it. Work rules still follow you into personal repos, and skills, subagents,
and MCP servers have no per-context scoping at all.
Claude Code has CLAUDE_CONFIG_DIR and Codex has CODEX_HOME,
but Gemini CLI has no config-dir override at all โ and IDE extensions ignore your
shell environment. agman switches by symlink, so it works everywhere.
Any time "who the agent is" should change with what you're working on.
Company conventions, internal tooling, and compliance reminders stay in the work profile. Weekend projects get a blank slate.
Separate instructions, skills, and MCP servers per client โ with no chance of one client's context leaking into another's session.
Profiles share your current login by default. Give one its own company account with
agman login โ it applies in IDEs too.
Try an aggressive global ruleset, a new plugin set, or someone else's dotfiles in a
throwaway profile. agman off puts everything back.
Claude Code, Codex, and Gemini flip together, so a context switch doesn't mean remembering three different mechanisms.
Only the instructions and skills that matter for this context get loaded, instead of one global file that grew to cover everything.
A profile holds one config tree per tool. agman use points each tool's config
path at the active profile, so every new session picks it up โ terminal, editor, or agent
SDK โ with no shell integration required.
~/.agman/work/claude/ -> ~/.claude ~/.agman/work/claude.json -> ~/.claude.json ~/.agman/work/codex/ -> ~/.codex ~/.agman/work/gemini/ -> ~/.gemini
| Tool | Config paths | Env override |
|---|---|---|
| Claude Code | ~/.claude, ~/.claude.json | CLAUDE_CONFIG_DIR |
| Codex CLI | ~/.codex | CODEX_HOME |
| Gemini CLI | ~/.gemini | none โ symlink only |
The first switch moves your existing configs into a normal profile called
global. Switch back to it any time, or run agman off to put the
real directories back and stop managing them.
With no profile active, agman is indistinguishable from not being installed. A real
directory means unmanaged; a symlink into ~/.agman means a profile is live.
It refuses to touch symlinks it didn't create.
New profiles inherit your current account, because Claude Code keeps login state and credentials in two different places. agman handles both, per platform.
One bash script with no dependencies. Works on stock macOS bash 3.2, Linux, WSL, and Git Bash.
brew install memandip/agman/agman
That first install trusts the tap, so brew install agman and
brew upgrade agman work by short name afterwards.
curl -fsSL https://raw.githubusercontent.com/\ memandip/agman/main/install.sh | bash
Keep it current with agman update.
agman create work --copy-current agman use work agman list # what exists, what's live agman current # active profile and tools agman doctor # diagnose anything odd agman off # hand your configs back
Nothing on disk changes until you run agman use.
Profiles share your current Claude account by default โ switching never drops you at a login prompt. When a profile needs a different account, opt in per profile.
agman login work # paste a token from 'claude setup-token' (hidden input) agman logout work # back to your shared account
setup-token value at
mode 600 and wires it through Claude Code's own apiKeyHelper
setting, which also applies to the VS Code extension and the Agent SDK. Tokens are never
printed, and cloning a profile never copies its account.
Each release is verified on macOS and Linux before it ships, including against the real vendor CLIs. The full roadmap records the research and the bugs testing caught.
Switching stopped triggering login prompts. Claude Code keeps account identity in
~/.claude.json and credentials in the Keychain or a file, depending on the
platform; agman now handles both.
A tap you can install from, audited and test-installed on every release.
Claude Code, Codex CLI, and Gemini CLI in one profile, with automatic migration of older profiles and a backup kept. Verified against the real CLIs.
agman login and agman logout, using a non-rotating token so
a profile's account holds up in editors as well as the terminal.
Push and pull profiles through a git remote you own, plus an .agman file
in a project root so agman use fetches the right profile for that repo.
Credentials stay excluded by design.
Qwen Code and Kimi CLI adapters once their layouts are verified, fish support, and shell completions.
Optional cloud storage with end-to-end encryption and company sign-in, only if there is real demand for it. Git remotes cover most of the need without a service.
Every release runs the suite on macOS bash 3.2 and Linux bash 5.2 โ one of them
without jq, python3, or curl, so the fallback paths
are exercised too. shellcheck runs on every commit.
Gemini and Codex were traced at the syscall level to confirm they read the symlinked config, don't replace the symlink when writing, and keep their state inside the active profile.
A clone that would have inherited another profile's account, a half-completed
activation, and a silent set -e failure were all caught before release and
are written up in the roadmap.