Sandbox Commands: sandbox
Sandboxes provide isolated remote environments for interactive development, command execution, file access, and reusable images.
Commands
| Command | Usage | Description |
|---|---|---|
connect | bohr sandbox connect <sandbox_id> [flags] | Resolve the data-plane connection for a sandbox. |
create | bohr sandbox create [template] [flags] | Create a sandbox. |
delete | bohr sandbox delete <sandbox_id>... [flags] | Delete one or more sandboxes. |
describe | bohr sandbox describe <sandbox_id> [flags] | Show sandbox details. |
doctor | bohr sandbox doctor [flags] | Check that the environment is ready for sandbox commands. |
exec | bohr sandbox exec <sandbox_id> [command...] [flags] | Execute a command in a sandbox. |
files | bohr sandbox files [command] | Manage files in a sandbox. |
image | bohr sandbox image [command] | Build and manage sandbox images. |
list | bohr sandbox list [flags] | List sandboxes. |
machine | bohr sandbox machine [command] | Manage sandbox machine SKUs. |
ps | bohr sandbox ps <sandbox_id> [flags] | List processes in a sandbox. |
quota | bohr sandbox quota [flags] | Show your sandbox / template / ephemeral-storage quota and usage. |
template | bohr sandbox template [command] | Manage sandbox templates. |
terminal | bohr sandbox terminal [command] | Manage PTY terminal sessions inside a sandbox. |
For subcommands inside a command group, run bohr sandbox <group> --help.
Common parameters
| Parameter | Description |
|---|---|
-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-timeout | Disable automatic timeout |
--env <KEY=VALUE> | Set an environment variable; may be repeated |
-c, --command <command> | Command executed by sandbox exec |
--background | Run 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.