CLI Reference

silo run

Run a command with automatic bind() interception. Shorthand: silo <cmd> is equivalent to silo run <cmd>.

silo npm run dev
silo run --name my-session -- npm run dev
silo run --ip 127.0.5.1 -- cargo run
--name, -nOverride session name (default: git branch)
--ipOverride IP address (must be in 127.0.0.0/8)
--quiet, -qSuppress the silo banner
--emit-jsonEmit session info as JSON to stderr before exec

silo env

Print environment variables for shell eval or programmatic use. Activates the session (IP alias, /etc/hosts) but doesn't exec a command.

eval "$(silo env)"
silo env --json | jq .SILO_IP
--name, -nOverride session name
--ipOverride IP address
--jsonOutput as JSON instead of shell exports

silo ip

Show the resolved IP for the current directory. No side effects, just prints the address.

$ silo ip
127.120.134.3

$ silo ip --json
{
  "ip": "127.120.134.3",
  "name": "main",
  "hostname": "main.myapp.silo",
  "dir": "/home/user/myapp"
}

silo ls

List active silo sessions. Shows IP aliases on the loopback interface, their hostnames, directories, and listening ports.

--jsonOutput as JSON
$ silo ls
  ● 2 active alias(es)
    127.0.1.1 · main.myapp.silo  /home/user/myapp
      :3000  :3001
    127.0.1.2 · feat.myapp.silo  /home/user/myapp/.worktrees/feat
      :3000

silo doctor

Check environment and diagnose common problems. Verifies: silo version, OS, git, sudoers config, helper binaries, bind library, /etc/hosts entries, and on Linux: cgroup v2, kernel version, eBPF state.

--jsonOutput as structured JSON
$ silo doctor
  ✓ silo: v0.3.0
  ✓ os: macOS 15.2
  ✓ git: git version 2.47.1
  ✓ sudoers: /etc/sudoers.d/silo configured
  ✓ ip helper: /usr/local/libexec/silo-ip-helper (root-owned)
  ✓ hosts helper: /usr/local/libexec/silo-hosts-helper (root-owned)
  ✓ bind lib: /usr/local/libexec/libsilo_bind.dylib
  ✓ hosts: 3 silo entry(ies) in /etc/hosts

silo prune

Remove unused loopback aliases and /etc/hosts entries. By default, only removes aliases with no listening ports.

--allRemove all aliases, even those with active ports
--yes, -ySkip confirmation prompt
--jsonOutput as JSON (implies --yes)

Environment variables

Set automatically inside every silo session:

SILO_IPAssigned loopback IP (e.g. 127.120.134.3)
SILO_NAMESanitized session name (e.g. feature-auth)
SILO_DIRGit repository root path
SILO_HOSTHostname (e.g. feature-auth.myapp.silo)

Configuration variables

Optional variables you can set to change silo's behavior:

SILO_CONNECTSet to 0 to disable connect() rewriting. Useful when you don't want silo to redirect outbound connections.
SILO_QUIETSuppress the silo session banner (same as --quiet)
SILO_LOGControl log level (default: ERROR)

Linux only

silo setup-ebpf: load and pin eBPF programs for rootless operation (requires sudo once).

silo teardown-ebpf: remove pinned eBPF programs.