agman โ€” agent manager

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.

v0.5.0 pure bash, zero dependencies macOS ยท Linux ยท WSL 204 tests, CI on two platforms MIT
Install View source Releases
zsh โ€” agman
# 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
The problem

One global config for every context you work in

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.

๐Ÿงฉ

Project files don't solve it

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.

๐Ÿ”—

Environment variables don't cover it

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.

Use cases

What people actually use it for

Any time "who the agent is" should change with what you're working on.

๐Ÿข

Work vs personal

Company conventions, internal tooling, and compliance reminders stay in the work profile. Weekend projects get a blank slate.

๐Ÿ‘ฅ

Per client or team

Separate instructions, skills, and MCP servers per client โ€” with no chance of one client's context leaking into another's session.

๐Ÿ”‘

Two accounts, one machine

Profiles share your current login by default. Give one its own company account with agman login โ€” it applies in IDEs too.

๐Ÿงช

Risk-free experiments

Try an aggressive global ruleset, a new plugin set, or someone else's dotfiles in a throwaway profile. agman off puts everything back.

๐ŸŽ›๏ธ

One switch, three tools

Claude Code, Codex, and Gemini flip together, so a context switch doesn't mean remembering three different mechanisms.

๐Ÿ’ค

Lighter context windows

Only the instructions and skills that matter for this context get loaded, instead of one global file that grew to cover everything.

How it works

Symlinks, not shell tricks

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
ToolConfig pathsEnv override
Claude Code~/.claude, ~/.claude.jsonCLAUDE_CONFIG_DIR
Codex CLI~/.codexCODEX_HOME
Gemini CLI~/.gemininone โ€” symlink only

Your setup is never lost

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.

Inactive means invisible

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.

Switching doesn't log you out

New profiles inherit your current account, because Claude Code keeps login state and credentials in two different places. agman handles both, per platform.

Install

Two commands and you're running

One bash script with no dependencies. Works on stock macOS bash 3.2, Linux, WSL, and Git Bash.

Homebrew

brew install memandip/agman/agman

That first install trusts the tap, so brew install agman and brew upgrade agman work by short name afterwards.

Or the installer

curl -fsSL https://raw.githubusercontent.com/\
memandip/agman/main/install.sh | bash

Keep it current with agman update.

First run

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.

Accounts

Share one login, or give a profile its own

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
Why a token rather than copied credentials. Refresh tokens rotate on every use, so snapshotting the Keychain or a credentials file leaves you with a stale copy that logs you out on the next switch. agman stores a long-lived 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.
Roadmap

Shipped, and what's next

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.

Built carefully

What "verified" means here

204 assertions, two platforms

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.

Checked against the real tools

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.

Tests that found real bugs

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.