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.
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
By default, sandboxes runtail -f /dev/null to keep the container alive for interactive use. Use --start-command to override this with your own entrypoint:
ENTRYPOINT, so make sure your command is the full process you want running. If you omit --start-command, the default keeps the sandbox idle and ready for prime sandbox run commands.
Network Access
Sandboxes have outbound internet access enabled by default. For isolated environments (e.g., running untrusted code), disable it:- Outbound connections to the internet are blocked
- DNS resolution for internal services still works
- Communication within the sandbox (e.g., sidecar) is allowed
Use Custom Docker Images
You can push your own Docker images to Prime’s registry and use them in sandboxes. Builds happen in the cloud, so you don’t need Docker running locally.Push an Image
Check Build Status
- Ready – Build succeeded, image is usable
- Building – Build in progress
- Pending – Queued for build
- Failed – Build failed (check your Dockerfile)
Use Your Image
Once the status shows Ready, create a sandbox with it:Delete an Image
Check In on Sandboxes
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.
Expose Ports
Make services running inside your sandbox accessible from the internet. Both HTTP and TCP protocols are supported. Ports must be in the range 22–9000. Ports 8080, 2222, and 8081 cannot be exposed.HTTP
Expose an HTTP service and get a public HTTPS URL:TCP
Expose a raw TCP service and get a publichost:port endpoint:
external_endpoint (host:port) and external_port instead of a URL. Connect using any TCP client:
Use prime sandbox list-ports <sandbox-id> to see both HTTP and TCP exposures along with their protocols and external ports.
SSH
Connect to a running sandbox with an interactive shell:Clean Up in Bulk
--label, or --all. Deletes are batched behind the scenes, and the CLI prints success/failure per sandbox so you can re-run failed IDs.
Need more ideas? Check the runnable scripts in prime-cli/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.