Command reference
Generated from
beachside schema. Runbun run --cwd apps/docs cli:generateafter changing a command.
Global flags
Section titled “Global flags”These work with every command.
| Flag | Description |
|---|---|
--json |
Print one JSON document on stdout (also BEACHSIDE_JSON=1) |
--profile <name> |
Profile from beachside.json (also BEACHSIDE_PROFILE) |
--provider <id> |
Official provider from environment credentials (also BEACHSIDE_PROVIDER) |
--config <path> |
Config file (default ~/.config/beachside/beachside.json, also BEACHSIDE_CONFIG) |
--state-dir <dir> |
State store folder (default ~/.config/beachside/state, also BEACHSIDE_STATE_DIR) |
-V, --version |
Print the CLI version |
Output
Section titled “Output”With --json, stdout holds exactly one document: {ok:true,data} or {ok:false,error:{code,message,retryable,outcome,hint?,known?,details?}}. Diagnostics always go to stderr.
exec, sh and run exit with the remote command’s exit code; their JSON data is {exitCode,stdout,stderr,truncated}, and run adds sandbox {name,id,kept}. Without –json, output streams as it arrives where the provider supports it.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | success |
| 1 | other failure |
| 2 | usage error; fix the command |
| 3 | not found |
| 4 | unsupported by this provider or profile, adapter missing or broken, npm or a password-manager CLI not installed, or store limit reached |
| 5 | authentication or permission failure, or an unreadable password-manager secret |
| 6 | outcome unknown: an effect may have happened, inspect before retrying |
| 7 | retryable: rate limit, capacity or unavailable before any effect |
| 8 | partial: some steps were confirmed; read error.known |
| 9 | setup failed: a setup or startup step exited nonzero or timed out; error.known.sandbox names the sandbox if it was kept |
| 125 | exec/run: the CLI or provider failed; details in the error |
| 130 | interrupted by SIGINT (129 for SIGHUP, 143 for SIGTERM); an interrupted run still destroys its sandbox |
Set up providers: install the adapter, store the key, check it works and save a profile (guided in a terminal).
beachside init [<provider>] [--profile <name>] [--api-key <key|ref>] [--set k=v]... [--network <policy>] [--store keychain|config] [--default] [--try]| Flag | Description |
|---|---|
--profile <name> |
The profile to write (default: the provider id; needed with –module) |
--api-key <key|ref> |
The provider key: a value, - to read it from stdin, env:NAME, or an op://, bws://, pass:// or keychain:// reference |
--credential <key=value> |
Any other credential, with the same value forms (repeatable) |
--set <key=value> |
A config setting, such as target=us; JSON values are parsed (repeatable) |
--network <policy> |
The profile’s network setting, such as internet or blocked |
--store <keychain|config> |
Where a pasted or piped key goes: beachside.json (mode 0600, the default) or the OS keychain |
--default |
Make this profile the default |
--try |
Also create a sandbox, run one command and destroy it |
--force |
Replace a profile of the same name that differs |
--no-check |
Skip asking the provider whether it accepts the key (offline setup) |
--no-input |
Never ask questions, even in a terminal (also BEACHSIDE_NO_INPUT=1 or CI) |
--module <package|path> |
Set up another adapter instead of an official provider; needs –profile |
--export <name> |
The –module export that holds the adapter (default: default) |
Examples:
beachside initbeachside init e2b --api-key env:E2B_API_KEY --defaultbeachside init boxd --api-key env:BOXD_API_KEY --set org=org-123 --network internetprintf %s "$KEY" | beachside init daytona --api-key - --set target=us --store keychainbeachside init boxd --profile boxd-work --api-key op://work/boxd/key --set org=org-456beachside init --module @acme/beachside-adapter --export acmeAdapter --profile acme --api-key env:ACME_KEYtelemetry
Section titled “telemetry”Show or change basic CLI usage telemetry (on by default; SDK sends none).
beachside telemetry [status | enable | disable]Examples:
beachside telemetry statusbeachside telemetry disablecreate
Section titled “create”Create a sandbox and print its name.
beachside create [--name <name>] [--image <oci-ref> | --prepared <id> | --snapshot <name>] [--network <policy>] [--ttl <duration>] [--env K=V]... [--setup <name|path>]... [--setup-cmd <shell>]... [--with rex|herdr]...| Flag | Description |
|---|---|
--name <name> |
Store name (default: generated, like sb-1a2b3) |
--image <oci-ref> |
OCI image, e.g. python:3.12; default is the profile’s image |
--prepared <id> |
Provider-prepared image id (template, snapshot name) |
--network <policy> |
blocked or internet; default is the profile’s policy |
--label <k=v> |
Label to set (repeatable) |
--env <K=V> |
Environment variable for every command in the sandbox (repeatable; K alone copies it from here) |
--env-file <path> |
Read K=V lines into the sandbox environment (repeatable; –env wins) |
--build |
Build –image now if this provider needs a build and none is recorded |
--ttl <duration> |
Destroy the sandbox after this long even if nothing removes it, e.g. 30m or 2h; default is the profile’s lifetime |
--snapshot <name> |
Restore a snapshot recorded by beachside snapshot create instead of an image |
--retry <duration> |
Keep retrying for up to this long when the provider refuses before creating anything (rate limit, capacity), e.g. 5m |
--grant <integration> |
Give the sandbox a credential-broker grant for this integration (repeatable; id=BASE_URL_ENV,API_KEY_ENV picks the variable names) |
--grant-ttl <duration> |
How long the grant lasts, up to 7d (default 1h); renew it with beachside broker grant renew <sandbox> |
--broker <name> |
Broker from beachside.json for –grant (default: defaultBroker or BEACHSIDE_BROKER) |
--setup <name|path> |
Run a named setup from beachside.json or a local script once the sandbox starts (repeatable, comma-separated) |
--setup-cmd <shell> |
Run a shell line as a setup step, after –setup (repeatable) |
--startup <path> |
Run a local script every time the sandbox comes up without its processes, such as after a restore (repeatable) |
--startup-cmd <shell> |
Run a shell line as a startup step (repeatable) |
--no-default-setup |
Skip the setups the profile lists by default |
--quiet-setup |
Show setup step names and failures, not their output |
--setup-timeout <duration> |
Overall limit for setup and startup, e.g. 45m (default 30m; each step 10m) |
--cache |
Cache this setup as a snapshot and restore it next time, even if no named setup asks for it |
--no-cache |
Neither use nor build a setup cache for this sandbox |
--refresh-cache |
Build the setup cache again now, replacing the current one |
--board <name> |
Mint a token on this beachbar board and set BEACHBAR_URL and BEACHBAR_TOKEN in the sandbox; rm revokes it |
--board-role <role> |
The token’s role on the board: worker (default), lead or observer |
--board-agent <name> |
The sandbox’s name on the board (default: the sandbox name) |
--board-ttl <duration> |
How long the board token lasts (default: –ttl, else 7d) |
--if-not-exists |
Return the named sandbox if it is still alive instead of failing |
--rm-on-failure |
Remove the sandbox if its setup fails, instead of keeping it to look at |
--with <server> |
Install and start a server reachable over your tailnet: rex or herdr (repeatable; needs TAILSCALE_AUTH_KEY, implies –network internet) |
Examples:
beachside create --name web --network internetbeachside create --name job-42 --if-not-exists --jsonbeachside create --name ci --env-file .env --env API_TOKENbeachside create --name job-42 --ttl 1hbeachside create --name job-42 --retry 5m --jsonbeachside create --name web --with rexbeachside create --name web --setup node --setup-cmd 'npm i -g pnpm'beachside create --name web --setup ./setup.sh --startup-cmd 'pnpm dev > /tmp/dev.log 2>&1 &'beachside create --name web --setup node --cachebeachside create --name worker-1 --network internet --board fix-authList sandboxes in the store with their current state.
beachside ls [--offline | --remote]| Flag | Description |
|---|---|
--offline |
Show stored records without asking providers |
--remote |
List the profile’s sandboxes from the provider instead of the store |
Examples:
beachside lsbeachside ls --jsonbeachside ls --remote --provider daytonaAdd a sandbox from the provider’s listing to the store so other commands reach it.
beachside adopt <id> [--name <name>]| Flag | Description |
|---|---|
--name <name> |
Store name (default: generated, like sb-1a2b3) |
Examples:
beachside ls --remotebeachside adopt 4f1c2a --name workerinspect
Section titled “inspect”Show a sandbox’s state, expiry and reference.
beachside inspect <sandbox>Examples:
beachside inspect web --jsonDestroy sandboxes and remove their records.
beachside rm <sandbox>... | --all [--force]| Flag | Description |
|---|---|
--all |
Every sandbox in this store |
--force |
Also destroy sandboxes this CLI did not create, or drop unreachable records |
Examples:
beachside rm webbeachside rm --allDestroy the provider’s sandboxes that carry the given labels, such as a killed job’s, and prune stale setup caches.
beachside gc --label k=v... [--older-than <duration>] [--dry-run]| Flag | Description |
|---|---|
--label <k=v> |
Only sandboxes with this label set at create (repeatable; all must match) |
--older-than <duration> |
Only sandboxes the provider says were created at least this long ago, e.g. 2h |
--dry-run |
List what would be destroyed and change nothing |
Examples:
beachside gc --label run=$GITHUB_RUN_IDbeachside gc --label ci=true --older-than 2h --dry-runRun a command in a sandbox; exits with the command’s exit code.
beachside exec <sandbox> [--cwd <dir>] [--env K=V]... [--stdin] -- <command> [args...]| Flag | Description |
|---|---|
--cwd <dir> |
Working directory in the sandbox |
--env <K=V> |
Environment variable for this command (repeatable; K alone copies it from here) |
--env-file <path> |
Read K=V lines into this command’s environment (repeatable; –env wins) |
--stdin |
Send this process’s stdin to the command |
--stdin-file <path> |
Send a local file as the command’s stdin |
--timeout <duration> |
Execution deadline, e.g. 90s or 10m (default 300s) |
--max-output <size> |
Captured output limit for buffered and –json output, e.g. 1m |
--no-stream |
Print the output when the command ends instead of as it arrives |
Exits with the remote command’s exit code; failures of the CLI itself exit 125.
Examples:
beachside exec web -- ls -la /beachside exec web --cwd /work --env CI=1 -- npm testRun a shell script in a sandbox; exits with its exit code.
beachside sh <sandbox> '<script>' | beachside sh <sandbox> -- '<script>' | beachside sh <sandbox> - < script.sh| Flag | Description |
|---|---|
--cwd <dir> |
Working directory in the sandbox |
--env <K=V> |
Environment variable for this command (repeatable; K alone copies it from here) |
--env-file <path> |
Read K=V lines into this command’s environment (repeatable; –env wins) |
--stdin |
Send this process’s stdin to the command |
--stdin-file <path> |
Send a local file as the command’s stdin |
--timeout <duration> |
Execution deadline, e.g. 90s or 10m (default 300s) |
--max-output <size> |
Captured output limit for buffered and –json output, e.g. 1m |
--no-stream |
Print the output when the command ends instead of as it arrives |
Exits with the remote command’s exit code; failures of the CLI itself exit 125.
Examples:
beachside sh web 'cd /work && make test'beachside sh web -- '-n is fine here'beachside sh web - < setup.shCreate a sandbox, run one command, and always destroy it.
beachside run [create flags] [exec flags] [--keep] [--push <path>] -- <command> [args...]| Flag | Description |
|---|---|
--name <name> |
Store name (default: generated, like sb-1a2b3) |
--image <oci-ref> |
OCI image, e.g. python:3.12; default is the profile’s image |
--prepared <id> |
Provider-prepared image id (template, snapshot name) |
--network <policy> |
blocked or internet; default is the profile’s policy |
--label <k=v> |
Label to set (repeatable) |
--env <K=V> |
Environment variable for this command (repeatable; K alone copies it from here) |
--env-file <path> |
Read K=V lines into this command’s environment (repeatable; –env wins) |
--build |
Build –image now if this provider needs a build and none is recorded |
--ttl <duration> |
Destroy the sandbox after this long even if nothing removes it, e.g. 30m or 2h; default is the profile’s lifetime |
--snapshot <name> |
Restore a snapshot recorded by beachside snapshot create instead of an image |
--retry <duration> |
Keep retrying for up to this long when the provider refuses before creating anything (rate limit, capacity), e.g. 5m |
--grant <integration> |
Give the sandbox a credential-broker grant for this integration (repeatable; id=BASE_URL_ENV,API_KEY_ENV picks the variable names) |
--grant-ttl <duration> |
How long the grant lasts, up to 7d (default 1h); renew it with beachside broker grant renew <sandbox> |
--broker <name> |
Broker from beachside.json for –grant (default: defaultBroker or BEACHSIDE_BROKER) |
--setup <name|path> |
Run a named setup from beachside.json or a local script once the sandbox starts (repeatable, comma-separated) |
--setup-cmd <shell> |
Run a shell line as a setup step, after –setup (repeatable) |
--startup <path> |
Run a local script every time the sandbox comes up without its processes, such as after a restore (repeatable) |
--startup-cmd <shell> |
Run a shell line as a startup step (repeatable) |
--no-default-setup |
Skip the setups the profile lists by default |
--quiet-setup |
Show setup step names and failures, not their output |
--setup-timeout <duration> |
Overall limit for setup and startup, e.g. 45m (default 30m; each step 10m) |
--cache |
Cache this setup as a snapshot and restore it next time, even if no named setup asks for it |
--no-cache |
Neither use nor build a setup cache for this sandbox |
--refresh-cache |
Build the setup cache again now, replacing the current one |
--board <name> |
Mint a token on this beachbar board and set BEACHBAR_URL and BEACHBAR_TOKEN in the sandbox; rm revokes it |
--board-role <role> |
The token’s role on the board: worker (default), lead or observer |
--board-agent <name> |
The sandbox’s name on the board (default: the sandbox name) |
--board-ttl <duration> |
How long the board token lasts (default: –ttl, else 7d) |
--cwd <dir> |
Working directory in the sandbox |
--stdin |
Send this process’s stdin to the command |
--stdin-file <path> |
Send a local file as the command’s stdin |
--timeout <duration> |
Execution deadline, e.g. 90s or 10m (default 300s) |
--max-output <size> |
Captured output limit for buffered and –json output, e.g. 1m |
--no-stream |
Print the output when the command ends instead of as it arrives |
--keep |
Keep the sandbox and print its name on stderr |
--push <path> |
Send a local folder to ~/work first and run the command there |
--exclude <glob> |
Skip matching paths (repeatable; a pattern without / matches any name) |
--include-ignored |
Send every file, not only git-tracked and unignored ones |
Exits with the remote command’s exit code; failures of the CLI itself exit 125.
Examples:
beachside run -- python3 -c 'print(2 + 2)'beachside run --network internet -- curl -sI https://example.combeachside run --push . --timeout 15m --ttl 30m -- sh -c 'npm ci && npm test'beachside run --push . --setup-cmd 'npm ci' -- npm testBuild OCI images for providers that need it, and list, delete or forget the builds.
beachside image build <oci-ref> [--name <name>] [--refresh] | ls [--remote] | inspect <name> | rm <name> [--force] | forget <name>| Flag | Description |
|---|---|
--name <name> |
Record name for a build (default: from the reference, like python-3-12) |
--refresh |
Build again even if this reference is recorded |
--remote |
List the images on the provider for this profile, not the local records |
--force |
Delete a recorded image this CLI did not verifiably create |
Examples:
beachside image build python:3.12 --provider e2bbeachside create --image python:3.12 --provider e2bbeachside image lsbeachside image ls --remote --provider e2bbeachside image rm python-3-12beachside image forget python-3-12snapshot
Section titled “snapshot”Capture a sandbox as a snapshot, and list, inspect, delete or forget snapshots.
beachside snapshot create <sandbox> [--name <name> [--replace]] | ls [--remote] | inspect <name> | rm <name> [--force] | forget <name>| Flag | Description |
|---|---|
--name <name> |
Record name for a capture (default: |
--replace |
Capture –name again; the old snapshot is deleted once the new one exists |
--remote |
List the snapshots on the provider for this profile, not the local records |
--force |
Delete a recorded snapshot this CLI did not verifiably capture |
Examples:
beachside snapshot create web --name depsbeachside create --snapshot deps --name web-2beachside run --snapshot deps -- npm testbeachside snapshot create web --name deps --replacebeachside snapshot lsbeachside snapshot rm depsRun setup in an existing sandbox, or list the named setups.
beachside setup <sandbox> [--setup <name|path>]... [--setup-cmd <shell>]... [--force] | setup ls | setup cache ls|rm <setup>|prune [--dry-run]| Flag | Description |
|---|---|
--setup <name|path> |
Run a named setup from beachside.json or a local script once the sandbox starts (repeatable, comma-separated) |
--setup-cmd <shell> |
Run a shell line as a setup step, after –setup (repeatable) |
--startup <path> |
Run a local script every time the sandbox comes up without its processes, such as after a restore (repeatable) |
--startup-cmd <shell> |
Run a shell line as a startup step (repeatable) |
--no-default-setup |
Skip the setups the profile lists by default |
--quiet-setup |
Show setup step names and failures, not their output |
--setup-timeout <duration> |
Overall limit for setup and startup, e.g. 45m (default 30m; each step 10m) |
--force |
Run every step, even ones the sandbox already has |
--dry-run |
setup cache rm and prune: list what would be deleted and change nothing |
Examples:
beachside setup lsbeachside setup webbeachside setup web --setup playwrightbeachside setup web --setup node --forcebeachside setup cache lsbeachside setup cache rm nodebeachside setup cache prune --dry-runCopy files or directories to or from a sandbox.
beachside cp [-r] <src> <dst> (one side is <sandbox>:/path)| Flag | Description |
|---|---|
--no-clobber |
Fail instead of overwriting an existing file |
-r, --recursive |
Copy directories as one tar archive (needs tar in the sandbox) |
--exclude <glob> |
Skip matching paths (repeatable; a pattern without / matches any name) |
Examples:
beachside cp ./app.py web:/work/app.pybeachside cp web:/work/out.json ./out.jsonbeachside cp -r ./src web:/work --exclude node_modulesbeachside cp -r web:/work/coverage ./coverageSend a local folder’s git-tracked and unignored files into a sandbox.
beachside push <sandbox>[:/dir] [path] (default: . to ~/work in the sandbox)| Flag | Description |
|---|---|
--exclude <glob> |
Skip matching paths (repeatable; a pattern without / matches any name) |
--include-ignored |
Send every file, not only git-tracked and unignored ones |
Examples:
beachside push cibeachside push ci:/srv/app ./app --exclude '*.log'beachside exec ci --cwd /srv/app -- npm testPrint a file from a sandbox.
beachside cat <sandbox>:/pathExamples:
beachside cat web:/etc/os-releasedoctor
Section titled “doctor”Check config, the provider connection and that the provider accepts the credentials, without creating anything.
beachside doctorExamples:
beachside doctor --provider e2badapter
Section titled “adapter”Install, list or remove the adapters the CLI loads, in ~/.config/beachside/adapters.
beachside adapter add <provider|package>[@version]... | ls | rm <provider|package>...Examples:
beachside adapter add e2bbeachside adapter add daytona vercel --jsonbeachside adapter add @acme/beachside-adapter@1.2.0beachside adapter lsbeachside adapter rm e2bprofile
Section titled “profile”List profiles, show where a profile’s settings come from, pick the default or remove one.
beachside profile ls | show [<name>] | use <name> | rm <name> [--force]| Flag | Description |
|---|---|
--force |
rm: remove the profile even though stored sandboxes, snapshots or images use it |
Examples:
beachside profile lsbeachside profile show e2b --jsonbeachside profile use boxdbeachside profile rm old-daytonabroker
Section titled “broker”Set up credential brokers for –grant, and manage a broker’s integrations, issuer allowlist, grants and canaries.
beachside broker add <name> (--url <origin> [--issuer-key <ref>] [--admin-key <ref>] | --deployment <.env.deploy>) [--default] | ls | use <name> | rm <name> | status | config show | integration <setup|list|show|create|rotate|enable|disable|delete> ... | issuer <show|allow|deny|set> ... | grant <issue|list|renew|revoke> ... | canary <issue|list|show|revoke> ... | alert <add|list|test|delete> ... [--broker <name>]| Flag | Description |
|---|---|
--broker <name> |
The broker to manage (default: defaultBroker, BEACHSIDE_BROKER, or BEACHSIDE_BROKER_URL) |
--url <origin> |
add: the broker’s HTTPS origin |
--issuer-key <key|ref> |
add: the issuer key: env:NAME, an op://, bws://, pass:// or keychain:// reference, - for stdin, or the value |
--admin-key <key|ref> |
add: the admin key, only needed to manage integrations from this machine |
--deployment <path> |
add: read the URL and key references from the broker’s .env.deploy (BEACHSIDE_BROKER_URL, BROKER_ISSUER_KEY, BROKER_ADMIN_KEY) |
--default |
add: make it the default broker |
--no-check |
add: save without asking the broker about the keys |
--ttl <duration> |
grant issue|renew: how long the grant lasts, up to 7d |
--all |
grant list: every grant, with the admin key |
Examples:
beachside broker add work --deployment ./credential-broker/.env.deploybeachside broker add work --url https://broker.example.com --issuer-key env:BROKER_ISSUER_KEY --admin-key op://infra/broker/adminbeachside broker statusbeachside broker integration setupbeachside broker issuer allow openrouterbeachside create --name agent --network internet --grant github --grant openrouter --grant-ttl 7dbeachside broker grant listbeachside broker grant renew agent --ttl 7dbeachside broker canary issue openrouter --label 'decoy .env' --env > decoy.envbeachside broker integration --help # every management command and flagRun beachbar, the agent message board: boards, tokens, tasks and watch (needs the beachbar command).
beachside board create <name> | ls | show | use <name> | guard <mode> | watch | token mint <agent> | task add <brief> | <any beachbar command> [--board <name>]Examples:
beachside board create fix-authbeachside board task add 'Add a rate limiter. Done when: bun test passes.' --board fix-authbeachside create --name worker-1 --network internet --board fix-authbeachside board watch --board fix-authbeachside board guard report --board fix-authbeachside board help # every beachbar commandproviders
Section titled “providers”List official providers, whether their adapter is installed and their credentials set.
beachside providersExamples:
beachside providers --jsonPrint the agent skill for this CLI, or set it up for your coding agents.
beachside skill [show | setup | status | remove] [--agent <name>]... [--project]| Flag | Description |
|---|---|
--agent <name> |
Only this agent: claude, codex, opencode or pi (repeatable; default: detected agents) |
--project |
Use this folder’s .agents/skills (and .claude/skills) instead of your home |
--dry-run |
Report what setup or remove would change without changing anything |
--force |
Let setup replace a beachside-cli skill that beachside did not install |
Examples:
beachside skillbeachside skill setupbeachside skill setup --project --dry-runbeachside skill status --jsonbeachside skill remove --agent claudecompletion
Section titled “completion”Print a shell completion script for zsh, bash or fish.
beachside completion <zsh|bash|fish>Examples:
source <(beachside completion zsh) # in ~/.zshrcsource <(beachside completion bash) # in ~/.bashrcbeachside completion fish > ~/.config/fish/completions/beachside.fish© 2026 Beachside Compute · Made by humans & in Texas