Skip to content
sproutboat
Esc
navigateopen⌘Jpreview
On this page

CLI reference

Every sproutboat command, grouped by task, plus every environment variable it reads.

Run commands with bunx sproutboat <command> or npx sproutboat <command>. Run sproutboat with no arguments for the grouped list.

Project

Command Does
init [name] Scaffold sproutboat.jsonc + src/index.js in ./<name>.
check [dir] Validate the config and entry point. No build.
types [dir] Write sproutboat-env.d.ts from the config — see Generated types.
build [dir] [--standalone] Cross-compile the sprout (Porffor + Zig). --standalone emits one executable with its bindings compiled in — see Standalone binaries.

Deployment

Command Does
deploy [dir] [--dry-run] [--no-wait] [--no-provision] [--artifact <dir>] Build, auto-provision id-less bindings, upload, wait until the URL serves. --dry-run stops before upload. --artifact uploads a prebuilt directory.
login [--api-url <url>] [--token <token>] Device-code browser flow, or store a token directly — see Get access.
tail [dir] [--sprout] Recent request logs. --sprout streams the sprout + broker stdout/stderr.
versions list [dir] List deployed versions.
rollback <version-id> [dir] Re-activate a previous version.
delete [dir] [--name <project>] --yes Delete the project, every version, and its route.

Domains

Command Does
domains list | add <host> | verify <host> | delete <host> [dir] Attach a custom domain — see Custom domains.

Secrets

Command Does
secrets list | put <NAME> [--value <value>] | delete <NAME> [dir] Manage encrypted project secrets — see Secrets.

Storage

Command Does
kv <list | create | info | rename | delete> Manage account-level KV namespaces. kv key, kv bulk, and kv export manage their contents — see Manage and export KV data.
d1 <list | create | info | rename | delete> Manage account-level D1 databases.
r2 <list | create | info | rename | delete> Manage account-level R2 buckets.
queues <list | create | info | rename | delete> Manage account-level queues.

Environment variables

Variable Purpose
SPROUTBOAT_API_URL Control-plane URL. Overrides the saved endpoint.
SPROUTBOAT_TOKEN API token. Overrides the saved credential. Set both to run fully headless.
SPROUTBOAT_CONFIG_DIR Directory for credentials.json (default ~/.config/sproutboat).
SPROUTBOAT_ZIG Path to a Zig binary instead of the downloaded one.
SPROUTBOAT_UWS_TARBALL uWebSockets source tarball to seed the build cache with, instead of the one vendored in the package.
SPROUTBOAT_COMPILE_TIMEOUT_MS Porffor compile timeout (default 600000).
CC / AR C compiler and archiver for building uSockets on a host build (default cc / ar).
SB_REQUEST_BODY_MAX Largest inbound request body, in bytes (default 1048576). Larger is refused with 413 before the handler runs.
SB_FETCH_MAX_BYTES Largest outbound fetch() response body a sprout will read (default 33554432).
NO_COLOR Plain output. Output is also plain when stdout is not a TTY.
SPROUTBOAT_NO_UPDATE_CHECK Skip the daily npm version check.

Was this page helpful?