Install the crownest CLI, log in, configure credentials, and understand exit codes and output formats.
The @crownest/cli package provides the crownest binary: a command-line
interface to sandboxes, commands, files, artifacts, and previews. It's
designed for scripting — most commands print JSON — and for quick manual
work like tailing logs or killing a sandbox.
[!IMPORTANT]
A sandbox command's own non-zero exit code still exits the CLI with
0 when execution succeeded. The CLI reports the API call's outcome,
not your command's. Inspect the exitCode field in the JSON output:
crownest exec sbx_abc123 -- false # CLI exits 0# ... "exitCode": 1 ... in the JSON output
List and run commands (projects list, sandboxes list,
commands run, files list, and so on) print JSON, ready for piping
into jq.
Targeted convenience commands print plain text: sandboxes create
prints the new sandbox ID, sandboxes kill prints sbx_... <status>,
artifacts create prints the artifact ID, previews create prints the
preview URL, and files read writes raw file content to stdout.
crownest logs streams log output live until the command reaches a
terminal state.