Manage Bailian sandbox instances and templates from the terminal: create, list, get, connect, pause, resume, and delete instances, as well as create, update, list, get, and delete templates with build-status polling.
Sandbox capabilities are currently available only to China site (aliyun.com) accounts, requiring the cn-beijing region and prior Sandbox SLR authorization.
Append --help to any command for full parameter details, e.g. bl sandbox create --help. Connection credentials are redacted by default; use --show-credentials when needed.
Instance management
| Capability | Command | Notes |
|---|
| List instances | bl sandbox list | List sandbox instances in the workspace |
| Instance details | bl sandbox get | Show configuration and connection info for a specific instance |
| Create instance | bl sandbox create | Create a sandbox instance |
| Connect to instance | bl sandbox connect | Get instance connection info (WebShell, CDP, VNC) |
| Pause instance | bl sandbox pause | Pause a running instance |
| Resume instance | bl sandbox resume | Resume a paused instance |
| Delete instance | bl sandbox delete | Release (delete) an instance (high-risk) |
Template management
| Capability | Command | Notes |
|---|
| List templates | bl sandbox template list | List sandbox templates in the workspace |
| Template details | bl sandbox template get | Show configuration for a specific template |
| Create template | bl sandbox template create | Create a sandbox template, with --image for built-in base image presets |
| Update template | bl sandbox template update | Update template configuration |
| Build status | bl sandbox template build-status | Query template build status (poll after --async submission) |
| Delete template | bl sandbox template delete | Delete a template (high-risk) |
Built-in images and file upload
| Capability | Command | Notes |
|---|
| Official images | bl sandbox official-images | List built-in base image presets (Code Interpreter, Browser, All-in-One); no auth required |
| Upload mount file | bl sandbox file upload | Upload template mount files (source=sandbox_template); returns File ID for mntConfig |
Examples
bl sandbox official-images
bl sandbox create --template-id <template-id> --instance-timeout 3600
bl sandbox get --sandbox-id <instance-id> --show-credentials --output json
bl sandbox template create --image code-interpreter --name my-sandbox-template