Skip to main content
All sandbox commands are under stackshift sandbox. They use the same public /api/v1 contract as the dashboard and SDKs.

Authentication and global options

The CLI resolves the active profile, then STACKSHIFT_TOKEN or its configured token. For CI, prefer a mode-0600 token file or stdin over a command argument. --project, --app, and --environment are global StackShift selectors but are not substitutes for explicit sandbox IDs.

Sandbox lifecycle

create --template requires a digest-qualified OCI reference. The CLI sends a generated idempotency key for each mutation. If a CLI process is interrupted after submission, use the printed operation ID instead of issuing a second create.

Execute and connect

The separator -- prevents remote arguments from being parsed as StackShift flags. Without --shell, argv is executed literally. With --shell, quoting and expansion are the caller’s responsibility.
Interactive terminal syntax:
The terminal command obtains a writer lease and scoped ticket. It does not expose or persist those credentials.

Snapshots

Do not restore from pending, creating, failed, deleting, or deleted. Inspect integrity, compatibility, encryption, lineage, and volatile_secrets_excluded on the snapshot.

Volumes

Capacity is a hard byte limit. Grow requests must increase it; shrinking is unsupported.

Temporary services

Service deletion also deletes its encrypted sidecar data volume. List/get output contains safe connection metadata, never the generated credential URL.

Secrets and bindings

Avoid echo because implementations can add a newline or interpret escapes. The CLI never prints submitted plaintext.

Automation rules

  • Use --output json and parse fields, not human tables.
  • Retain operation IDs before waiting.
  • Set --timeout to the expected operation duration.
  • Page while has_more is true using next_cursor.
  • Resume events from the last committed sequence.
  • Treat timeouts and transport failures as unknown outcomes.
  • Never automate --yes without a prior inventory and exact resource IDs.

API and SDKs

Use the same contract programmatically.

Troubleshooting

Interpret errors and recover safely.