Skip to main content
Each environment is a fully isolated context: its own .claude config, device identity, Claude Code version, and optional proxy.

create

Create a new environment.
cac env create <name> [-p <proxy>] [-c <version>] [--type local|container]
FlagDescription
-p, --proxyProxy address. Optional.
-c, --claudeClaude Code version to pin. Auto-installs if not present.
--typelocal (default) or container.
Examples:
# Identity isolation only (no proxy, system Claude)
cac env create personal

# With proxy
cac env create work -p 1.2.3.4:1080:user:pass

# With proxy + pinned version
cac env create work -p socks5://proxy:1080 -c 2.1.81

# Auto-install latest Claude Code
cac env create dev -c latest
Proxy formats:
host:port:user:pass       # auto-detect protocol (tries http → socks5 → https)
host:port                 # unauthenticated
socks5://user:pass@host:port
http://host:port
Environment names must be alphanumeric, dashes, or underscores. Names like my-work and prod_us1 are valid; my/work is not.

ls

List all environments.
cac env ls
cac ls        # shortcut
  ▶ work
      proxy: socks5://u:p@1.2.3.4:1080  claude: 2.1.81  type: local
    personal
      claude: system  type: local
The marker shows the active environment.

activate

Activate an environment. This is global — affects all terminals.
cac env activate work
cac work              # shortcut
Activation:
  1. Sets ~/.cac/current to the environment name
  2. Updates statsig and user ID files in the isolated .claude config
  3. Restarts relay if TUN is detected and proxy is configured

deactivate

Deactivate the current environment. Claude Code runs unprotected.
cac env deactivate

check

Run diagnostics on the current active environment.
cac env check
Checks:
  • Environment info (proxy, UUID, version, timezone)
  • Proxy connectivity and exit IP (if proxy configured)
  • TUN conflict detection (if proxy configured)
  • Security protections (DNS guard, telemetry env vars, mTLS)

rm

Remove an environment. Cannot remove the active environment.
cac env rm staging
This permanently deletes the environment directory including its .claude config, identity files, and mTLS certificates.