Skip to main content

CLI Commands

caged up

Create and start a sandbox. Reads .caged.yaml if present in the current directory.
caged up [flags]
FlagDescriptionDefault
--templateBase imagenode-20
--cpusvCPU count2
--memoryMemory in MB512
--diskDisk in GB5
--repoGit repo to clone
--budgetMax spend in USD
--initInit script to run
--timeoutIdle timeout in seconds900
--networkNetwork mode: full, none, allowlistfull
--configPath to config file.caged.yaml
Examples:
# Quick sandbox from current directory
caged up

# Custom configuration
caged up --template python-312 --cpus 4 --memory 2048 --budget 10

# With repo and init script
caged up --repo https://github.com/user/project --init "npm install"

# From a config file
caged up --config ./my-sandbox.yaml

caged connect

Connect to a running sandbox’s terminal.
caged connect <sandbox-id>
Opens an interactive terminal session inside the sandbox.

caged ls

List all sandboxes.
caged ls [flags]
FlagDescription
--statusFilter by status: running, paused, all
--formatOutput format: table, json, yaml
caged ls
caged ls --status running
caged ls --format json

caged pause

Pause a running sandbox.
caged pause <sandbox-id>

caged resume

Resume a paused sandbox.
caged resume <sandbox-id>

caged destroy

Destroy a sandbox permanently.
caged destroy <sandbox-id> [flags]
FlagDescription
--forceSkip confirmation prompt

caged snapshot

Manage snapshots.
caged snapshot create <sandbox-id> --name "checkpoint"
caged snapshot list <sandbox-id>
caged snapshot restore <snapshot-id> --to <sandbox-id>
caged snapshot download <snapshot-id> --output ./snapshot.tar.gz
caged snapshot delete <snapshot-id>

caged ports

View detected ports and preview URLs.
caged ports <sandbox-id>
PORT   PROTOCOL   PREVIEW URL                                        PROTECTED
3000   http       https://cage-a1b2c3d4-3000.preview.caged.dev      no
5432   tcp        —                                                   no

caged logs

View sandbox logs.
caged logs <sandbox-id> [flags]
FlagDescription
--follow, -fStream logs in real-time
--tailNumber of lines to show (default: 100)
--sinceShow logs since timestamp or duration (e.g., 5m)

caged status

Show detailed status of a sandbox.
caged status <sandbox-id>
Sandbox:     cage-a1b2c3d4
Status:      running
Template:    node-20
CPUs:        2
Memory:      1024 MB
Disk:        5 GB
Uptime:      2h 15m
Cost:        $0.42
Trust Score: 94
Ports:       3000 (http)

caged auth

Manage authentication.
caged auth login          # Browser-based login
caged auth logout         # Clear stored credentials
caged auth status         # Show current auth status
caged auth token          # Print current API token

caged version

Print CLI version.
caged version