PRE-RELEASE: Sandbox commands are not GA yet. Their arguments, flags, and output may change.
start
Options
TEXT (repeatable)
Environment variable for the command as KEY=VALUE, on top of the sandbox’s own. Repeatable.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
BOOL
Keep the sandbox from going to sleep while the process runs.
INTEGER
Most restarts with —restart-on-failure.
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Name for the process, to find it later with —process-name.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Restart the process when it exits with a failure.
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
TEXT
Stop the command if it runs longer than this, such as 10m.
TEXT (repeatable)
Return only once the process listens on this port. Repeatable.
TEXT
Directory to run the command in.
BOOL
Enable verbose logging
Examples
Start a web server in the backgroundFilter output with --jq
Start a process and print its PID
Output
Text mode (--output text): The started process’s PID and how to follow its output.
JSON mode (--output json): Go output type sandboxapi.ProcessResponse.
The process record as of the start.
list
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
List processes in a sandboxFilter output with --jq
Print every running process’s PID
Output
Text mode (--output text): Table with columns: PID, NAME, STATUS, EXIT, STARTED, COMMAND. Prints “No processes found.” to stderr when the list is empty.
JSON mode (--output json): Go output type cmd.SandboxProcessList.
describe
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
PID of the process.Mutually exclusive with other flags in group
process-ref.TEXT
Name the process was started with.Mutually exclusive with other flags in group
process-ref.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
Describe a process by nameFilter output with --jq
Print a process’s standard error
Output
Text mode (--output text): One field per line describing the process, without its output. Empty fields are left out.
JSON mode (--output json): Go output type sandboxapi.ProcessResponse.
logs
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
PID of the process.Mutually exclusive with other flags in group
process-ref.TEXT
Name the process was started with.Mutually exclusive with other flags in group
process-ref.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Print the process’s output from the start, then follow it until the process exits or you interrupt with Ctrl-C. For machine-readable streaming, prefer —output jsonl over —output json.
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
Print a process’s output so farFilter output with --jq
Print only a process’s standard error as it arrives
Output
Text mode (--output text): The process’s output lines. With —tail, standard error lines go to stderr.
JSON mode (--output json): Go output type cmd.SandboxProcessLogLine.
One record per line. stream is stdout or stderr with —tail, and left out otherwise, since the output so far does not say which stream a line came from.
wait
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
PID of the process.Mutually exclusive with other flags in group
process-ref.TEXT
Name the process was started with.Mutually exclusive with other flags in group
process-ref.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
TEXT
Fail if the process has not exited after this long, such as 30m. The process keeps running.
BOOL
Enable verbose logging
Examples
Wait for a process to exit, for up to an hourFilter output with --jq
Wait for a process and print its output
Output
Text mode (--output text): One field per line describing the exited process, without its output. Empty fields are left out.
JSON mode (--output json): Go output type sandboxapi.ProcessResponse.
stop
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
PID of the process.Mutually exclusive with other flags in group
process-ref.TEXT
Name the process was started with.Mutually exclusive with other flags in group
process-ref.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
Stop a process by nameOutput
Text mode (--output text): A confirmation line on stderr.
kill
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
PID of the process.Mutually exclusive with other flags in group
process-ref.TEXT
Name the process was started with.Mutually exclusive with other flags in group
process-ref.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
Kill a process by PIDOutput
Text mode (--output text): A confirmation line on stderr.