stackshift sandbox. They use the same public /api/v1 contract as the dashboard and SDKs.
Authentication and global options
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.
Snapshots
pending, creating, failed, deleting, or deleted. Inspect integrity, compatibility, encryption, lineage, and volatile_secrets_excluded on the snapshot.
Volumes
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
echo because implementations can add a newline or interpret escapes. The CLI never prints submitted plaintext.
Automation rules
- Use
--output jsonand parse fields, not human tables. - Retain operation IDs before waiting.
- Set
--timeoutto the expected operation duration. - Page while
has_moreis true usingnext_cursor. - Resume events from the last committed sequence.
- Treat timeouts and transport failures as unknown outcomes.
- Never automate
--yeswithout a prior inventory and exact resource IDs.
API and SDKs
Use the same contract programmatically.
Troubleshooting
Interpret errors and recover safely.