Prerequisites
- Docker (or OrbStack on macOS) — the CLI sandboxes
agents in containers, so it needs a working
dockeron PATH. - An Airlock server already deployed and reachable (its URL). Standing up the server itself? See deploy.
- An account on that server — there’s no self-signup. An admin has to create your account first (see creating a new user) before you can log in.
Install
1
Install the CLI
Download the release tarball for your platform and put the binary on
PATH:
<platform> is one of darwin-amd64, darwin-arm64, linux-amd64,
linux-arm64 — your Airlock contact hands you the release URL for the
current version. (No Windows build — Docker Desktop + WSL2 is the
supported path there, same as any Linux target.)2
Log in
~/.airlock/auth.json (mode 0600) — an ingest-scoped API
token, so sessions and published events are attributed to you — and
immediately ships anything captured locally before this login existed
(see troubleshooting).3
Give the agent your API key
ANTHROPIC_API_KEY,
OPENAI_API_KEY, OPENROUTER_API_KEY, and XAI_API_KEY are passed through
by default — see configuration.Open a sandbox
- The repo is mounted read-write at
/<reponame>, which is also the working directory. - The host home directory,
~/.ssh,~/.aws, and other repos are absent. - All network traffic is forced through the repo’s Airlock proxy. Out of the
box it allowlists (model APIs work, everything else gets a
403); switch it to a blocklist when you would rather not gate the team — see choosing a mode. - Every connection attempt is logged to
~/.airlock/logs/<repo>/audit-<date>.jsonl, stamped with your user id, the repo, and timing/byte counts.
Open up the network
By default the agent can reach the model APIs (api.anthropic.com,
api.openai.com, openrouter.ai, api.x.ai) and the Claude Code auth and
config hosts (claude.com, claude.ai) — nothing else. Two ways to give it
more:
.airlock.toml
.airlock.toml
airlock run, so either change takes effect the
next time you start a sandbox. See
choosing a mode for when each fits.
Add an internal system
Give the agent scoped access to Notion or Confluence:airlock claude picks it up.
See MCP connectors.
Review what it did
Exit the session normally — it auto-publishes (tool/network access, chat transcript) with no extra command. Then open the console your server serves:airlock publish still exists to ship anything
queued by hand. See audit log for what gets shipped and
retained, and console for what the UI shows.
Tear down
airlock stop cleans up the repo’s proxy and is safe to run when there is
nothing to remove. The backend keeps running independently — see
deploy.
Creating a new user (admin only)
No UI for this yet — it’s API-only:role is "user" (sees only their own activity) or "admin" (sees
everyone’s, can create more accounts). They then follow the steps above with
their own credentials.
Upgrading the CLI
Same as installing — download the new version’s tarball, overwrite the old binary:~/.airlock/auth.json and everything else under ~/.airlock/ survives an
upgrade untouched — no need to log in again.
Troubleshooting
- “Why did I have to run
airlock publishmanually?” — If you ranairlock claudebeforeairlock loginever succeeded, that session’s activity was captured locally fine, but had no token to ship with (the ingestion API requires auth — there’s no anonymous path). This now fixes itself automatically: logging in ships anything queued locally, regardless of when it was captured. If you’re on an older CLI build without that fix, runairlock publishby hand once, after logging in. - New account can’t log in — confirm the admin actually got a
201back from the create-user call, and that the email/password match exactly (no trailing whitespace from a copy-paste).

