sail CLI manages sailboxes and apps from the terminal. To install it, see
Install the CLI. Run sail --help or sail <command> --help for the
same information at the prompt.
Interactive shell
For interactive use,sail shell is usually the most convenient option. It opens
a REPL on your machine that accepts every command below without the leading
sail (so box list, box create ...), and adds touches the one-shot commands
do not: line editing and history, a picker menu when you omit a sailbox id, and
confirmation prompts.
sail <command> subcommands are non-interactive and take their
arguments up front, which suits scripts and agents (add --json for
machine-readable output).
Mind the naming: sail shell is a shell for managing sailboxes from your
machine. It is not a shell inside a box. To open a shell inside a running
sailbox, use sail box shell (below).
Global options
These work on any command.| Option | Effect |
|---|---|
--json | Emit machine-readable JSON instead of human-readable text. |
--help | Show help for the CLI or a command. |
sail --version prints the CLI version (top-level only).
Authentication comes from SAIL_API_KEY, falling back to the credential stored
by sail auth login. See Configuration.
Authentication
Apps
Sailbox lifecycle
| Command | Description |
|---|---|
sail box show <id> | Show a single sailbox. |
sail box list | List sailboxes in the current org (see flags below). |
sail box terminate <id> | Permanently terminate a sailbox. |
sail box sleep <id> | Checkpoint and release compute. |
sail box pause <id> | Freeze in place. |
sail box resume <id> | Resume a paused or sleeping sailbox. |
sail box checkpoint <id> | Checkpoint a running sailbox. |
sail box from-checkpoint <checkpoint-id> | Create a new sailbox from a checkpoint (--name). |
sail box upgrade <id> | Upgrade the runtime (now if running, else at next wake). |
sail box create
| Option | Description |
|---|---|
--app <name> | App name (created if missing). Required. |
--name <name> | Sailbox name within the app. Required. |
--arch <arm|amd> | Base image architecture (default arm). |
--port <n> | HTTP ingress port to expose. Repeatable. |
--size <s|m> | Resource size (default m): s = 1 vCPU, 16 GB memory, 32 GB disk; m = 4 vCPU, 32 GB memory, 128 GB disk. Billing is by usage, so a bigger size costs no more on its own. s gives the fastest cold starts, forks, and resumes, and its lower ceilings cap what a runaway workload can consume. |
--memory-gib <n> | Memory ceiling in whole GiB, within the size’s range: 2-64 for s, 8-128 for m. The size’s default when omitted. |
--disk-gib <n> | Disk size in whole GiB, within the size’s range: 8-128 for s, 32-512 for m. The size’s default when omitted. |
--enable-ssh | Expose port 22, trust your org’s CA, and start sshd. |
--identity-file <path> | Local SSH key to authenticate with (implies --enable-ssh). |
sail box list
| Option | Description |
|---|---|
--app <name> | Filter by app name. |
--status <status> | Filter by status. |
--search <text> | Filter by id/name substring. |
--limit <n> | Maximum rows. |
--offset <n> | Rows to skip. |
Run commands and connect
sail box exec
Run a command in a sailbox, streaming its output.
| Option | Description |
|---|---|
--cwd <dir> | Working directory inside the guest. |
--timeout <dur> | Kill the command after this long (e.g. 30s, 5m). |
-i, --stdin | Pipe local stdin to the guest command. |
-t, --tty | Run under a pseudo-terminal driven by your terminal. |
--background | Start the command and return once accepted (no output captured). |
sail box run
Create an ephemeral sailbox, run a command, then terminate it. A shortcut for
create + exec + terminate; for workflows that reuse a sailbox, use those
directly.
create sizing/port flags plus --name (default run-<hex>),
--cwd, --timeout, and --keep (leave the sailbox running instead of
terminating it).
sail box shell
exec, so it opens no port and does not
count against your org’s port allocation. (Not to be confused with sail shell,
the local REPL for managing boxes.)
sail box cp
<id>:<path> denotes the remote side.
Networking
--tcp exposes raw TCP instead of HTTP. --allowlist restricts sources to a
CIDR prefix (e.g. 203.0.113.0/24), or, for HTTP listeners, a Sail app name.
See Networking for the full model.
SSH
sail box ssh sets up SSH access so you can reach a box as ssh <name>.sail.
For a quick interactive shell, prefer sail box shell: it
needs no open port. Reach for SSH when you need a real SSH endpoint rather than a
PTY over exec, such as scp/rsync, an editor’s remote mode, or a devbox you
work in day to day. Enabling it exposes port 22 as a TCP ingress port, which
counts against your org’s port allocation.
- enable: turn on SSH for a box (expose port 22, install your org’s CA, start
sshd), certify your key on this machine, and add the
<name>.sailshortcut. - alias: add
ssh <name>.sailshortcuts for boxes already SSH-enabled elsewhere (e.g. from the SDK), without waking them. - disable: stop SSH on a box and drop its local shortcut.
Configuration
Manage~/.sail/config.toml.