Run multiple isolated instances of any AI coding tool : simultaneously.
No more logging in and out. Launch as many sandboxed profiles as you need, each with its own auth, config, sessions, and extensions. Switch between work accounts, client projects, or personal setups instantly.
🌐 Language / 语言:
| Tool | Kind | Isolation | Status |
|---|---|---|---|
| Claude Code | CLI | env (CLAUDE_CONFIG_DIR) |
stable |
| OpenAI Codex CLI | CLI | env (CODEX_HOME) |
stable |
| OpenCode | CLI | env (OPENCODE_CONFIG_DIR) |
stable |
| Gemini CLI | CLI | env (GEMINI_CLI_HOME) |
stable |
| Command Code | CLI | redirectHome |
stable |
| Cursor | IDE | userDataDir |
stable |
| Antigravity | IDE | sandboxUser |
archived (requires admin, see archive/) |
| AGY-CLI | CLI | sandboxUser |
archived (requires admin, see archive/) |
Each tool has its own folder at the repo root with an adapter.json describing how isolation works.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/install.sh | bashWindows — open PowerShell:
irm https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/install.ps1 | iexAfter install, restart your terminal for PATH changes to take effect.
git clone https://github.com/Spielewoy/multi-codex.git
cd multi-cli
./scripts/install.sh --local # macOS/Linux
.\scripts\install.ps1 -Local # WindowsAfter install, restart your terminal for PATH changes to take effect.
Requirement (macOS/Linux): jq must be installed (brew install jq / apt install jq).
# Create a profile
multi-cli new claude-cli/work
# Launch it
multi-cli launch claude-cli/work
# Or use the shorthand
multi-cli claude-cli/workEach profile gets an automatic shell alias:
| Platform | Location |
|---|---|
| macOS / Linux | ~/MultiCliProfiles/bin/ (add to PATH) |
| Windows | Start Menu shortcuts created automatically |
| Command | Description |
|---|---|
multi-cli new <tool>/<name> |
Create a new isolated profile |
multi-cli new <tool>/<name> --shared |
Lightweight profile (shared settings, isolated auth) |
multi-cli new <tool>/<name> --from <tpl> |
Create from a saved template |
multi-cli <tool>/<name> |
Launch a profile (shorthand) |
multi-cli launch <tool>/<name> |
Launch a profile |
multi-cli list [<tool>] |
List all profiles |
multi-cli status |
Show running state, type, last used, and size |
multi-cli clone <tool>/<src> <tool>/<dest> |
Copy an existing profile |
multi-cli rename <tool>/<old> <tool>/<new> |
Rename a profile |
multi-cli delete <tool>/<name> |
Delete a profile and all its data |
| Command | Description |
|---|---|
multi-cli template save <tool>/<profile> <name> |
Save a profile as a reusable template |
multi-cli template list |
List saved templates |
multi-cli template delete <name> |
Remove a template |
| Command | Description |
|---|---|
multi-cli export <tool>/<name> [path] |
Archive a profile to .tar.gz (.zip on Windows) |
multi-cli import <archive> <tool>/<name> |
Restore a profile from an archive |
| Command | Description |
|---|---|
multi-cli tools |
List all supported tools and their install status |
multi-cli stats |
Show disk usage per profile |
multi-cli doctor |
Diagnose your environment |
multi-cli completion {bash|zsh|powershell} |
Set up shell tab-completion |
multi-cli help |
Show help |
multi-cli version |
Show version |
multi-cli uses five isolation strategies depending on what the tool supports:
| Strategy | How it works | Used by |
|---|---|---|
env |
Sets a config-dir environment variable before launch | Claude Code, Codex, OpenCode, Gemini CLI |
userDataDir |
Passes --user-data-dir and --extensions-dir flags |
Cursor |
redirectHome |
Points HOME/USERPROFILE at a per-profile dir, symlinks shared dotfiles back |
Command Code |
appdata |
Redirects %APPDATA% only (Windows) |
(available but unused) |
sandboxUser |
Creates a dedicated OS user per profile for complete credential/keychain isolation | (available but unused) |
Each tool's <id>/adapter.json declares which strategy to use.
| Flag | Meaning |
|---|---|
| (none) | Full — completely isolated. Fresh auth, fresh config. |
--shared |
Shared — symlinks settings/extensions from your main install. Auth stays isolated. |
--cli |
CLI — marks the profile for terminal-only launch (skips GUI discovery). |
--from <tpl> |
Clone from a saved template. |
| Variable | Default | Purpose |
|---|---|---|
MULTICLI_HOME |
~/MultiCliProfiles |
Where all profiles are stored |
MULTICLI_OVERRIDE_BINARY |
(unset) | Force a specific binary path for the next launch |
MULTICLI_REPO |
(unset) | Git URL for remote install |
MULTICLI_PLATFORM |
(auto) | Override platform detection (darwin, linux) |
multi-cli doctorChecks that your profile storage exists, alias directory is in PATH, and each tool's binary is detected (or shows an install hint).
multi-cli completion bash # or zsh, powershellFollow the instructions to add it to your .zshrc, .bashrc, or PowerShell $PROFILE.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/uninstall.sh | bashWindows
irm https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/uninstall.ps1 | iexYou'll be asked whether to remove your profile data — nothing is deleted without confirmation.
- Creator — Spielewoy
同时运行多个隔离的 AI 编程工具实例。
不再需要反复登入登出。启动任意数量的沙盒配置文件,每个都拥有独立的认证、配置、会话和扩展。在工作账户、客户项目或个人设置之间即时切换。
| 工具 | 类型 | 隔离方式 | 状态 |
|---|---|---|---|
| Claude Code | CLI | env (CLAUDE_CONFIG_DIR) |
稳定 |
| OpenAI Codex CLI | CLI | env (CODEX_HOME) |
稳定 |
| OpenCode | CLI | env (OPENCODE_CONFIG_DIR) |
稳定 |
| Gemini CLI | CLI | env (GEMINI_CLI_HOME) |
稳定 |
| Command Code | CLI | redirectHome |
稳定 |
| Cursor | IDE | userDataDir |
稳定 |
| Antigravity | IDE | sandboxUser |
已归档(需要管理员权限,见 archive/) |
| AGY-CLI | CLI | sandboxUser |
已归档(需要管理员权限,见 archive/) |
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/install.sh | bashWindows — 打开 PowerShell 运行:
irm https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/install.ps1 | iexAfter install, restart your terminal for PATH changes to take effect.
git clone https://github.com/Spielewoy/multi-codex.git
cd multi-cli
./scripts/install.sh --local # macOS/Linux
.\scripts\install.ps1 -Local # WindowsAfter install, restart your terminal for PATH changes to take effect.
依赖 (macOS/Linux): 需要安装 jq(brew install jq / apt install jq)。
# 创建配置文件
multi-cli new claude-cli/work
# 启动
multi-cli launch claude-cli/work
# 或使用简写
multi-cli claude-cli/work| 命令 | 说明 |
|---|---|
multi-cli new <工具>/<名称> |
创建新的隔离配置文件 |
multi-cli new <工具>/<名称> --shared |
轻量配置文件(共享设置,隔离认证) |
multi-cli new <工具>/<名称> --from <模板> |
从模板创建 |
multi-cli <工具>/<名称> |
启动配置文件(简写) |
multi-cli launch <工具>/<名称> |
启动配置文件 |
multi-cli list [<工具>] |
列出所有配置文件 |
multi-cli status |
显示运行状态、类型、最后使用时间和大小 |
multi-cli clone <工具>/<源> <工具>/<目标> |
复制配置文件 |
multi-cli rename <工具>/<旧名> <工具>/<新名> |
重命名配置文件 |
multi-cli delete <工具>/<名称> |
删除配置文件及其所有数据 |
| 命令 | 说明 |
|---|---|
multi-cli template save <工具>/<配置文件> <名称> |
将配置文件保存为可复用模板 |
multi-cli template list |
列出已保存的模板 |
multi-cli template delete <名称> |
删除模板 |
| 命令 | 说明 |
|---|---|
multi-cli export <工具>/<名称> [路径] |
归档为 .tar.gz(Windows 为 .zip) |
multi-cli import <归档文件> <工具>/<名称> |
从归档恢复配置文件 |
| 命令 | 说明 |
|---|---|
multi-cli tools |
列出所有支持的工具及安装状态 |
multi-cli stats |
显示每个配置文件的磁盘使用量 |
multi-cli doctor |
诊断环境 |
multi-cli completion {bash|zsh|powershell} |
设置 shell 补全 |
multi-cli help |
显示帮助 |
multi-cli version |
显示版本 |
multi-cli 根据工具支持情况使用五种隔离策略:
| 策略 | 工作方式 | 使用者 |
|---|---|---|
env |
启动前设置配置目录环境变量 | Claude Code, Codex, OpenCode, Gemini CLI |
userDataDir |
传递 --user-data-dir 和 --extensions-dir 参数 |
Cursor |
redirectHome |
将 HOME/USERPROFILE 指向配置文件目录,共享 dotfiles 通过符号链接 |
Command Code |
appdata |
仅重定向 %APPDATA%(Windows) |
(可用但未使用) |
sandboxUser |
为每个配置文件创建专用操作系统用户,实现完全的凭证/钥匙串隔离 | (可用但未使用) |
每个工具的 <id>/adapter.json 声明使用哪种策略。
| 参数 | 含义 |
|---|---|
| (无) | 完全隔离 — 全新的认证和配置。 |
--shared |
共享 — 符号链接主安装的设置/扩展,认证保持隔离。 |
--cli |
CLI — 标记为仅终端启动(跳过 GUI 发现)。 |
--from <模板> |
从已保存的模板克隆。 |
| 变量 | 默认值 | 用途 |
|---|---|---|
MULTICLI_HOME |
~/MultiCliProfiles |
所有配置文件的存储位置 |
MULTICLI_OVERRIDE_BINARY |
(未设置) | 强制指定下次启动的二进制路径 |
MULTICLI_REPO |
(未设置) | 远程安装的 Git URL |
MULTICLI_PLATFORM |
(自动) | 覆盖平台检测(darwin、linux) |
multi-cli doctor检查配置文件存储是否存在、别名目录是否在 PATH 中、以及每个工具的二进制文件是否被检测到。
multi-cli completion bash # 或 zsh、powershell按照提示将其添加到 .zshrc、.bashrc 或 PowerShell $PROFILE 中。
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/uninstall.sh | bashWindows
irm https://raw.githubusercontent.com/Spielewoy/multi-codex/main/scripts/uninstall.ps1 | iex卸载前会询问是否删除配置文件数据 — 未经确认不会删除任何内容。
- 创建者 — Spielewoy