跳到主要内容

Sandbox Commands: sandbox

Sandboxes provide isolated remote environments for interactive development, command execution, file access, and reusable images.

Commands

CommandUsageDescription
connectbohr sandbox connect <sandbox_id> [flags]Resolve the data-plane connection for a sandbox.
createbohr sandbox create [template] [flags]Create a sandbox.
deletebohr sandbox delete <sandbox_id>... [flags]Delete one or more sandboxes.
describebohr sandbox describe <sandbox_id> [flags]Show sandbox details.
doctorbohr sandbox doctor [flags]Check that the environment is ready for sandbox commands.
execbohr sandbox exec <sandbox_id> [command...] [flags]Execute a command in a sandbox.
filesbohr sandbox files [command]Manage files in a sandbox.
imagebohr sandbox image [command]Build and manage sandbox images.
listbohr sandbox list [flags]List sandboxes.
machinebohr sandbox machine [command]Manage sandbox machine SKUs.
psbohr sandbox ps <sandbox_id> [flags]List processes in a sandbox.
quotabohr sandbox quota [flags]Show your sandbox / template / ephemeral-storage quota and usage.
templatebohr sandbox template [command]Manage sandbox templates.
terminalbohr sandbox terminal [command]Manage PTY terminal sessions inside a sandbox.

For subcommands inside a command group, run bohr sandbox <group> --help.

Common parameters

ParameterDescription
-t, --template <name>Sandbox template name
--gpu[=4090\|5090\|l20]Quickly select a GPU template; using --gpu alone selects 4090
--project-id <id>Associate the sandbox with a project
--timeout <seconds>Automatic deletion timeout; the default is 12 hours
--never-timeoutDisable automatic timeout
--env <KEY=VALUE>Set an environment variable; may be repeated
-c, --command <command>Command executed by sandbox exec
--backgroundRun an exec command in the background and return its PID

Examples

bohr sandbox machine list --choose-type gpu --sort price
bohr sandbox create --gpu=l20 --project-id 123 --timeout 7200
bohr sandbox exec 456 --command "python /bohr-workspace/main.py"
bohr sandbox files read 456 /bohr-workspace/result.json --destination ./result.json
bohr sandbox quota
bohr sandbox doctor

Creating sandboxes and building or committing images can incur charges. Deleting a sandbox is destructive; check its running processes before using --force.