DOCS

CLI

The qbox command — a scriptable wrapper over the API for developers and operators.

pip install qbox-sh also installs the qbox command. Operators may prefer an isolated install:

pipx install qbox-sh

It wraps the SDK and adds multi-profile config, rich output, and operator commands.

Authenticate

qbox auth login        # prompts for base URL + API key, saved to ~/.config/qbox/config.yaml
qbox doctor            # end-to-end deployment check

Use --profile <name> (or QBOX_PROFILE) to switch between deployments.

Sandboxes

qbox sandboxes create python-3.12              # → prints sb_018f… (scriptable)
qbox sandboxes list
qbox sandboxes run-code sb_018f -e "print(6*7)"
qbox sandboxes exec sb_018f -- pytest -q
qbox sandboxes files cp ./script.py sb_018f:/tmp/script.py
qbox sandboxes ssh sb_018f                     # interactive PTY (needs qbox[shell])
qbox sandboxes kill sb_018f -y

Operator commands

qbox hosts list
qbox hosts drain <host>      # stop scheduling new sandboxes here
qbox hosts cordon <host>
qbox hosts uncordon <host>

qbox templates create <name> --image python:3.12
qbox templates list
qbox templates delete <id>

qbox api-keys create <name>
qbox api-keys list
qbox api-keys revoke <id>
qbox api-keys rotate <id>

qbox audit logs

Output & scripting

Output is human-readable tables/prose in a TTY and JSON when piped, so it’s scriptable by default. Force a format with -o json|yaml|table|prose.

Exit codes are documented and stable:

CodeMeaning
0success
2usage error
3auth error
4not found
5transient (safe to retry)
6conflict
10declined / refused confirmation
124timeout