Airlock
Reference

CLI Reference

Complete command reference for the Airlock CLI.

The airlock CLI manages your local gate repos, Push Requests, and the background daemon.

Setup Commands

airlock init

Initialize Airlock in the current repository. Rewires origin to a local gate repo and renames the original remote to upstream.

airlock init

Creates .airlock/workflows/main.yml with a default workflow if no workflow files exist.

airlock eject

Remove Airlock from the current repository. Restores the original origin remote and deletes the gate repo.

airlock eject

airlock status

Show the current Airlock status for the repository: whether it's initialized, the gate repo path, and the upstream remote URL.

airlock status

Push Request Commands

airlock runs

List recent Push Requests for the current repository.

airlock runs

airlock show <run-id>

Show details for a specific Push Request, including status, branch, artifacts, and step results.

airlock show abc123

airlock cancel <run-id>

Cancel a running or awaiting Push Request. Stops workflow execution and discards the push.

airlock cancel abc123

Daemon Commands

airlock daemon start

Start the Airlock daemon (airlockd) in the background.

airlock daemon start

airlock daemon stop

Stop the running daemon.

airlock daemon stop

airlock daemon restart

Restart the daemon.

airlock daemon restart

airlock daemon status

Check whether the daemon is running.

airlock daemon status

airlock daemon install

Install the daemon as a system service (launchd on macOS). This is done automatically by brew install --cask airlock.

airlock daemon install

airlock daemon uninstall

Remove the daemon from system services.

airlock daemon uninstall

Exec Commands

Commands used inside workflow steps to interact with the Airlock runtime.

airlock exec agent "<prompt>"

Run the configured AI agent with the given prompt. The agent adapter is set in .airlock/config.yml. Output is printed to stdout.

airlock exec agent "Write a PR description for this diff"

Pass --output-schema with a JSON schema to get structured JSON output:

airlock exec agent "Generate a PR title and description" \
  --output-schema '{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["title","body"]}'
FlagRequiredDescription
--output-schemaNoJSON schema that constrains the agent's response to structured JSON

airlock exec freeze

Freeze the worktree. Commits pending changes and locks files from further modification. See Freeze.

airlock exec freeze

airlock exec json <path>

Read JSON from stdin, extract a field by dot-separated path, and print it. Strings are printed unquoted; other types are printed as JSON.

# Extract a field
echo '{"title": "Hello"}' | airlock exec json title

# Nested field access
echo '{"a": {"b": "deep"}}' | airlock exec json a.b

# Pretty-print the whole object
echo '{"a": 1}' | airlock exec json .

# Add or overwrite fields with --set
echo '{"a": 1}' | airlock exec json . --set b=2 --set c=hello
ArgumentDescription
<path>Dot-separated field path (e.g., title, a.b.c) or . for the whole object
--set KEY=VALUEAdd or overwrite a field. Value is parsed as JSON if valid, otherwise treated as a string. Repeatable.

Artifact Commands

Commands for producing artifacts from workflow steps. See Artifacts.

airlock artifact content

Add a content artifact (PR title and description) to the Push Request.

airlock artifact content --title "Add feature X" --body "Description in Markdown"
FlagRequiredDescription
--titleYesTitle text
--bodyNoBody text in Markdown

airlock artifact comment

Add an inline review comment to a specific file and line.

airlock artifact comment --file src/auth.ts --line 42 --message "Consider error handling" --severity warning
FlagRequiredDescription
--fileYesFile path relative to repo root
--lineYesLine number
--messageYesComment text
--severityNoinfo, warning, or error (default: info)

airlock artifact patch

Add a patch artifact from the current worktree diff.

airlock artifact patch --title "Fix formatting" --explanation "Applied prettier rules"
FlagRequiredDescription
--titleYesShort description
--explanationNoWhy this change is suggested

Diagnostic Commands

airlock doctor

Run diagnostics to check that Airlock is configured correctly: daemon status, gate repo health, remote configuration.

airlock doctor

airlock nuke

Remove all Airlock data for the current repository — gate repo, worktrees, and artifacts. Does not modify your repository's code or history.

airlock nuke