Spin Up a Workspace

prime sandbox create python:3.11-slim \
  --name analytics-lab \
  --cpu-cores 2 \
  --memory-gb 4 \
  --disk-size-gb 20 \
  --timeout-minutes 240 \
  --env PROFILE=production
Why it’s nice:
  • Omit --name to auto-generate a slug.
  • Keep secrets safe—values are obfuscated in output.
  • Pass --team-id if you need to charge a different workspace.
  • Add --yes to skip the confirmation prompt in automation.
  • GPUs? Coming soon. For now, leave off --gpu-count; the flag is ignored until GPU sandboxes launch.

Check In on Sandboxes

# Overview at a glance
prime sandbox list --status RUNNING --output table

# Rich details for one sandbox
prime sandbox get sbx_123 --output json

# Quick command to verify the runtime
prime sandbox run sbx_123 --working-dir /workspace "python -c 'print(42)'"

# Capture logs for later debugging
prime sandbox logs sbx_123 > logs.txt

Move Files Around

# Push local assets into the sandbox
prime sandbox upload sbx_123 notebooks/analysis.ipynb /workspace/

# Pull results back home
prime sandbox download sbx_123 /workspace/report.csv reports/latest.csv
If a transfer complains about auth, run prime sandbox reset-cache and retry—the CLI refreshes the gateway token for you.

Clean Up in Bulk

# Delete a short list of sandboxes in one go
prime sandbox delete sbx_123 sbx_456 sbx_789

# Wipe every active sandbox (careful!)
prime sandbox delete --all --yes
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 rerun prime sandbox list --status RUNNING. If it stays pending, delete and recreate from a known-good image.
  • Hitting auth issues? prime sandbox reset-cache refreshes the gateway token after you rotate API keys.