CLI

Sandboxes

Create and manage Linux workspaces from your terminal.

In the examples below, replace scratch with your sandbox ID or name.

Create a sandbox

shell
boltz create  # configure your sandbox, then connect automatically

After you select the settings, the CLI creates the sandbox and opens its shell automatically. Type exit or press Ctrl-D to leave. Use boltz create --no-connect to create without opening a shell. Piped commands and CI runs do not connect automatically.

Choose resources

List available machine sizes, prices, and environments.

shell
boltz machines
boltz environments

List and inspect

shell
boltz ls
boltz status scratch

Run commands

Use the name or ID of an existing sandbox.

shell
boltz exec scratch pip install requests
boltz exec scratch "cd /workspace && python train.py"

Upload and run a file

shell
boltz cp ./train.py scratch:/workspace
boltz exec scratch python /workspace/train.py

Open a shell

Reconnect to an existing sandbox. Type exit or press Ctrl-D to leave.

shell
boltz connect scratch

Pause, resume, or delete

Pause to release compute and keep files. Delete when you no longer need the sandbox.

shell
boltz pause scratch
boltz resume scratch
boltz rm scratch

Fork a sandbox

Start a new sandbox with a copy of another one's /workspace. The original keeps running. Running processes and packages installed outside /workspace are not copied. A fork counts toward your concurrent limit and is billed until you pause or delete it.

shell
boltz fork scratch try-b   # new sandbox "try-b" with scratch's files
boltz fork scratch         # the new sandbox gets its id as its name

Copy files

Upload a directory or download results.

shell
boltz cp ./src scratch:/workspace
boltz cp scratch:/workspace/results.json ./results.json

Browser access

Start a web server in a sandbox, then open its port.

shell
boltz create --no-connect --name web --internet --environment python
boltz exec web "python -m http.server 8000" &
boltz open web 8000

Forward a port

Access the sandbox on localhost:9000. Press Ctrl-C to stop forwarding.

shell
boltz forward web 9000:8000