Spin Up a Workspace
- Omit
--nameto auto-generate a slug. - Pass
--team-idif you need to charge a different workspace. - Add
--yesto skip the confirmation prompt in automation.
Idle Timeout
--timeout-minutes caps the total lifetime. For VM sandboxes, set it to any negative value to remove the lifetime deadline. --idle-timeout-minutes terminates the sandbox sooner when nothing is using it, which is useful for agent workflows that might forget to clean up.
exec, upload, download, or file-read request lands within the idle window. Each new request resets the clock; long-running execs stay pinned for their full duration.
- Disabled by default. Set
--idle-timeout-minutesto opt in. - Must be between 1 and 1,440 minutes. For a finite lifetime, it must not exceed
--timeout-minutes. - SSH sessions do not count as activity.
prime sandbox get and on the dashboard reads Idle Timeout.
Environment Variables & Secrets
Use--env for general configuration and --secret for sensitive values. Both accept KEY=VALUE format and can be specified multiple times.
Start Command
Pass a start command after-- to run your own process when the sandbox boots. There is no shell, so every argument must be its own token:
&&), invoke a shell explicitly:
prime sandbox run.
Network Isolation
Sandboxes can restrict outbound traffic at creation time. Use an allowlist or a denylist — the two are mutually exclusive.example.com, *.example.com) or IPv4 addresses/CIDRs; IPv6 is not supported.
Update the rules on a running sandbox with prime sandbox network. Each call replaces the whole list, and each flag takes a single comma-separated value:
prime sandbox network <sandbox-id>.
Custom Docker Images
You can build and push custom Docker images to use in sandboxes. See the Prime Images guide for details.Check In on Sandboxes
prime sandbox run accepts --timeout <seconds> for the command itself, -w/--working-dir, and repeatable -e/--env KEY=VALUE overrides.
Organize with Labels
Labels help you tag and manage groups of sandboxes:- Grouping related experiments or workflows
- Tracking which team or project owns a sandbox
- Bulk cleanup by category (dev, staging, test, etc.)
Move Files Around
prime sandbox reset-cache and retry—the CLI refreshes the gateway token for you.
SSH
Connect to a running sandbox with an interactive shell:ssh) must be installed locally, and the sandbox must be RUNNING.
By default you get a /bin/sh login shell, running as the sandbox’s default user in its working directory. To use a different shell installed in the image:
-- is passed straight to ssh, so you can run a single command instead of opening a shell:
-L/-R), agent forwarding, scp, and sftp are not. Use prime sandbox upload / download to move files.
SSH sessions do not count as activity for the idle timeout, so a sandbox with an open SSH connection can still be shut down if you set --idle-timeout-minutes.
Clean Up in Bulk
--label, or --all. --all and --label deletes run as a single server-side scoped delete: by default they cover your own sandboxes, --all-users covers the whole team, and --user <user-id> covers one teammate (both admin-only). The CLI prints a count preview before deleting, and per-sandbox results for explicit IDs.
Need more ideas? Check the runnable scripts in prime/examples/ for CLI walkthroughs you can customize.
Quick Troubleshooting
- Sandbox stuck in
PROVISIONING? Wait a minute, then rerunprime sandbox list --status RUNNING. If it stays pending, delete and recreate from a known-good image. - Hitting auth issues?
prime sandbox reset-cacherefreshes the gateway token after you rotate API keys.