CLI commands
Everything in Eclipse Enclave runs through the enclave command. You run it from
inside a git repository, and it starts the agent in an isolated container so its
activity stays confined to the container and the worktree you mounted. By default the session works against the branch
currently checked out in that folder. To run several agents in parallel without
their changes colliding, give each one its own git worktree (see
Run against an isolated worktree).
The CLI is still evolving, and more commands and flags are on the way. This page covers the core commands available today; it will grow as the surface stabilizes.
Overview
| Command | What it does |
|---|---|
enclave | Start a sandboxed session with the default agent in the current repository. |
enclave --tool <name> | Start a session with a specific agent. |
enclave continue | Resume your previous session. |
enclave ps | List the sessions that are currently running. |
enclave --background | Start a session detached from your terminal. |
enclave attach <container> | Attach to a running session (default detach key: Ctrl-\). |
enclave network log | Show what the session's gateway allowed and blocked. |
Start a session
Run enclave from inside a git repository to launch the default agent:
enclave
Enclave builds the environment, mounts the current folder into a fresh container, and starts the agent against the branch you have checked out. The agent runs at full autonomy with no confirmation prompts, and it stays contained: its filesystem access and outbound network are scoped to the sandbox.
Run against an isolated worktree
By default the agent works on your current branch in the current folder. To keep parallel sessions from interfering, or to keep an agent off your working branch, create a separate git worktree first and start the session there. This is plain git, no Enclave-specific setup required:
git worktree add ../myproject-agent -b agent/experiment
cd ../myproject-agent
enclave
Each worktree has its own working directory and branch, so agents in different
worktrees never touch each other's changes. When you are done, review the branch
and clean up with git worktree remove ../myproject-agent.
Pick a specific agent
Use --tool to choose which agent runs in the session. Enclave supports Claude
Code, Codex, Theia AI, OpenCode, and more.
enclave --tool codex
Resume a previous session
Pick up where you left off. Auth, config, and history persist across restarts, so
continue drops you back into your last session with its state intact.
enclave continue
List active sessions
See which sessions are running right now, so you can track parallel agents and choose one to inspect or resume.
enclave ps
The NAME column in the output is what you pass to enclave attach.
Run in the background and reattach
Long-running agents do not need to keep your terminal busy. Start a session with
--background to detach it from your shell right after boot, then reattach when
you want to check in or interact:
enclave --background # start detached (optionally pair with --name)
enclave ps # find the running session's container name
enclave attach <container> # reattach to its TTY
Combine --background with --name when you want a stable, memorable container
name to reattach to:
enclave --background --name my-task
enclave attach my-task
Detach without stopping the session
Once attached, press Ctrl-\ (the docker attach default) to detach from the
session while leaving the container and its agent running. You can then reattach
later with enclave attach <container>.
To use a different detach key sequence, pass --detach-keys when attaching:
enclave attach my-task --detach-keys "ctrl-p,ctrl-q"
Pressing Ctrl-C inside the session sends an interrupt to the agent instead of
detaching, so use the detach key when you want to leave the container running.
Audit outbound network access
With the default Docker backend, every outbound connection passes through the session's gateway, which records what it allowed and what it blocked. Read that log at any time, including for sessions that have already exited:
enclave network log # everything this project's sessions reached
enclave network log --follow # stream events as they happen
enclave network log --verdict deny # only what the gateway blocked
enclave network log --summary # per-domain aggregate
By default the log records one event per encrypted connection, not one per
request, and only the DNS lookups that failed or were blocked. An agent
streaming from its model API holds one long-lived connection, so it appears once
when that connection opens and stays quiet afterwards. A short log does not mean
a quiet session. Start the session with --network-log=requests to record
every individual HTTP and HTTPS request instead:
enclave --network-log=requests
This makes the gateway decrypt allowlisted HTTPS traffic, so clients that pin certificates may fail in this mode.
Next steps
New to Enclave? Start with Getting Started to install it and run your first session. Deeper guides for custom skills, extra mounts, and per-project network allowlists are on the way.