PRE-RELEASE: Sandbox commands are not GA yet. Their arguments, flags, and output may change.
list
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
INTEGER
default:"1000"
Most sandboxes to list. 0 lists all.
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
Free-text search over sandbox names and labels.
TEXT (repeatable)
Only sandboxes with one of these statuses. Repeatable.One of:
archived, archiving, building, deactivated, deactivating, deleting, deployed, deploying, failed, terminated, unarchiving, uploadingTEXT
Team name or ID to list sandboxes of. 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 sandboxesFilter output with --jq
Print every sandbox’s URL
Output
Text mode (--output text): Table with columns: NAME, STATUS, REGION, CREATED. Prints “No sandboxes found.” to stderr when the list is empty, and a note to stderr when —limit left some out.
JSON mode (--output json): Go output type cmd.SandboxList.
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
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Reveal secret environment variable values. Requires the workspace administrator role; other callers still see masked values.
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 sandboxFilter output with --jq
Print the sandbox’s URL
Output
Text mode (--output text): One field per line describing the sandbox. Empty fields are left out.
JSON mode (--output json): Go output type managementapi.Sandbox.
create
Options
TEXT (repeatable)
Secret environment variable as KEY=VALUE, masked when read back. Repeatable.
BOOL
Return the existing sandbox with this name instead of failing, or recreate it if it is failed, terminated, or being deleted.
TEXT
Image to create the sandbox from, including its tag, such as my-image:latest.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT (repeatable)
Label as KEY=VALUE. Repeatable.
INTEGER
Memory in MB, which also sets the CPU allocation.
TEXT
Unique name of the sandbox. The server generates one when omitted.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT (repeatable)
Environment variable that is not secret, as KEY=VALUE, readable when read back. Repeatable.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Region to create the sandbox in.
TEXT
Team name or ID to create the sandbox in. 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
Create a sandbox with a generated name and server defaultsFilter output with --jq
Create a sandbox and print its generated name
Output
Text mode (--output text): One field per line describing the created sandbox. Empty fields are left out.
JSON mode (--output json): Go output type managementapi.Sandbox.
update
Options
TEXT (repeatable)
Secret environment variable as KEY=VALUE, masked when read back. Repeatable.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT (repeatable)
Label as KEY=VALUE, replacing all of the sandbox’s labels. Repeatable.
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT (repeatable)
Environment variable that is not secret, as KEY=VALUE, readable when read back. Repeatable.
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
Replace a sandbox’s labelsFilter output with --jq
Replace a sandbox’s labels and print them
Output
Text mode (--output text): One field per line describing the updated sandbox. Empty fields are left out.
JSON mode (--output json): Go output type managementapi.Sandbox.
delete
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
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging
Examples
Delete a sandbox without the confirmation promptFilter output with --jq
Delete a sandbox and print its status
Output
Text mode (--output text): A confirmation line on stderr.
JSON mode (--output json): Go output type managementapi.Sandbox.
The sandbox’s record as deletion starts.
exec
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)
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
Send this command’s standard input to the sandbox command, closing it at end of input. Output then arrives a line at a time, so a prompt without a newline shows once its line ends.
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
Directory to run the command in.
BOOL
Enable verbose logging
Examples
Run a commandFilter output with --jq
Run a command and print its exit code
Output
Text mode (--output text): The command’s standard output on stdout and standard error on stderr, as they arrive.
JSON mode (--output json): Go output type sandboxapi.ProcessResponse.
The process record once the command exits, with its captured output, and nothing streamed.
connect
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
Open a terminal to a sandboxOutput
Text mode (--output text): The sandbox’s terminal, until the shell exits.