Skip to main content

CLI Commands

The Caged CLI organizes commands into groups. The main sandbox management commands are under caged sandboxes, with shortcut aliases available for convenience.

caged login

Authenticate with your Caged account via browser.
Opens your browser to caged.dev/auth/device where you approve the CLI access. The CLI automatically receives your credentials once approved — no manual key copying needed.

Manual login (API key)

If you prefer to paste an API key directly (CI environments, headless servers):
Prompts for your API URL and API key interactively. Stores credentials at ~/.config/caged/config.json.

caged up

Create a sandbox from .caged.yaml in the current directory.
Examples:

caged sandboxes

The sandboxes command group manages sandbox lifecycle.

caged sandboxes list

List all sandboxes. Alias: caged list, caged ls.
Examples:
Table output:
JSON output:

caged sandboxes create

Create and start a new sandbox. Alias: caged run.
Examples:

caged sandboxes connect

Connect to a running sandbox’s interactive terminal. Alias: caged connect.
Opens a full interactive terminal (real PTY over WebSocket) — like ssh into the sandbox. Output streams live, so long-running commands and AI agents show their progress in real time. Arrow keys, tab completion, Ctrl+C, colors, and terminal resizing all work.
For non-interactive/scripted use, prefer caged exec.

caged sandboxes exec

Execute a single command in a sandbox and return the output. Alias: caged exec.
Examples:

caged sandboxes sleep

Pause a running sandbox. No compute charges while sleeping. Alias: caged sleep.

caged sandboxes wake

Resume a sleeping sandbox. Alias: caged wake.

caged sandboxes destroy

Destroy a sandbox permanently. Alias: caged destroy, caged rm.

caged sandboxes logs

View sandbox event logs. Alias: caged logs.

caged mcp

Run a Model Context Protocol server over stdio, bridged to a running sandbox. MCP clients like Claude Desktop and Cursor spawn this command locally — no WebSocket setup or session tokens required.
Add it to your MCP client configuration:
The AI client gets sandbox tools (filesystem_read, filesystem_write, terminal_exec, git_commit, and more) that execute inside the isolated VM. The sandbox must be running — wake it with caged wake <sandbox-id> first if it’s sleeping.

caged version

Print CLI version.

Shortcut Aliases

For convenience, sandbox commands have shortcuts at the top level: These shortcuts are provided for backward compatibility and convenience. Both forms work identically.

caged policy

Manage security policies (Cage Rules).

caged policy list

List all policies for your account.

caged policy templates

Show available policy templates.

caged policy apply

Apply a built-in template to your account.
Templates: soc2, hipaa, dev-only, restrictive, permissive

caged policy delete

Delete a policy by ID.

caged eval

Manage agent eval scenarios and runs (Cage Eval).

caged eval list

List all eval scenarios.

caged eval load

Load scenarios from a YAML file. Supports suite files (.caged-eval.yaml) and single scenario files (*.scenario.yaml).

caged eval discover

Find eval scenario files in a directory.

caged eval run

Run a specific scenario.

caged eval flakiness

Run a scenario multiple times to detect flakiness.

caged eval regression

Detect performance regression against baseline runs.

caged eval runs

List run history for a scenario.

caged eval delete

Delete a scenario.