Shell Integration
Shell integration wraps agent tool commands so they automatically use the active ARC profile. No need to call arc launch manually every time.
Setup
Run once to install shims and add the integration line to your shell profile:
arc setupThis:
- Installs the
arcshim into~/.local/bin(or equivalent) and adds it toPATH - Appends the shell integration line to your shell's profile file
- Detects your shell automatically
Open a new terminal after setup completes.
Manual Integration
# Add to ~/.bashrc or ~/.zshrc
eval "$(arc shell-init)"# Add to ~/.config/fish/config.fish
arc shell-init --shell fish | source# Add to your $PROFILE
arc shell-init --shell powershell | Out-String | Invoke-ExpressionPowerShell Note
The | Out-String step is required. Piping a multi-line string directly to Invoke-Expression in PowerShell fails. Out-String collapses it to a single evaluable block.
How It Works
The integration installs shell functions that:
- Call
arc _resolve-config-dirto get the active profile's config directory - Set the appropriate env var (
CLAUDE_CONFIG_DIR, etc.) for the tool - Invoke the real tool binary with the original arguments
- Clean up the env var after the process exits (PowerShell and fish)
Currently the claude wrapper is installed. Additional wrappers for gemini and codex follow as those tool integrations mature.
Shell Options
arc setup --shell bash # Force bash integration
arc setup --shell zsh
arc setup --shell fish
arc setup --shell powershell
arc setup --no-shell # Skip shell profile modificationProfile Resolution Order
When a tool command is invoked via the shell wrapper:
ARC_PROFILEenv var (if set — useful for scripts)- Workspace
arc.json(if present in cwd or parent) - Active profile in
~/.arc/config.json - No override (falls through to bare tool invocation)
Scripting with ARC_PROFILE
Set ARC_PROFILE to override which profile is used without modifying config.json:
ARC_PROFILE=work claude --help
ARC_PROFILE=gemini-work gemini --versionThis works with both the shell wrapper and arc launch.
Subshell
Open a new shell with the profile's environment already active:
arc shell [name]If name is omitted, the active profile is used. Exit normally (exit or Ctrl+D) to return.
Exec
Run any command with a profile's environment variables injected, without launching the agent tool:
arc exec <name> -- <command> [args...]
# Examples
arc exec work -- claude --help
arc exec work -- env | grep CLAUDE
arc exec aws -- aws sts get-caller-identityUseful for scripts, CI pipelines, or any tool that reads auth env vars.