Commands
Complete reference for all CUA CLI commands
Overview
The CUA CLI provides commands for authentication and sandbox management.
Command Styles
The CLI supports two command styles for flexibility:
Flat style (quick & concise):
cua list
cua create --os linux --size small --region north-america
cua start my-sandboxGrouped style (explicit & clear):
cua sb list # or: cua sandbox list
cua sb create # or: cua sandbox create
cua sb start # or: cua sandbox startBoth styles work identically - use whichever you prefer!
Available Commands
- Authentication -
cua auth login,cua auth env,cua auth logout(also available as flat commands:cua login,cua env,cua logout) - Sandbox Management -
cua list,cua create,cua start,cua stop,cua restart,cua delete,cua vnc
Authentication Commands
cua auth login
Authenticate with your CUA account using browser-based OAuth flow.
# Interactive browser login
cua auth login
# Direct API key login
cua auth login --api-key sk-your-api-key-here
# Alternative flat style
cua login
cua login --api-key sk-your-api-key-hereOptions:
--api-key <key>- Provide API key directly instead of browser flow
Example:
$ cua auth login
Opening browser for CLI auth...
API key savedcua auth env
Create or update a .env file in the current directory with your CUA API key.
cua auth env
# Alternative flat style
cua envExample:
$ cua auth env
Wrote /path/to/your/project/.envThe generated .env file will contain:
CUA_API_KEY=sk-your-api-key-herecua auth logout
Remove the stored API key from your system.
cua auth logout
# Alternative flat style
cua logoutExample:
$ cua auth logout
Logged outSandbox Commands
cua list
List all your sandboxes with their current status. Passwords are hidden by default for security.
# List sandboxes (passwords hidden)
cua list
# Show passwords explicitly
cua list --show-passwords
# Alternative aliases
cua ls
cua psExample Output (default, passwords hidden):
NAME STATUS HOST
my-dev-sandbox running my-dev-sandbox.sandbox.cua.ai
test-windows stopped test-windows.sandbox.cua.aiExample Output (with --show-passwords):
NAME STATUS PASSWORD HOST
my-dev-sandbox running secure-pass-123 my-dev-sandbox.sandbox.cua.ai
test-windows stopped another-pass-456 test-windows.sandbox.cua.aicua create
Create a new sandbox.
cua create --os <OS> --size <SIZE> --region <REGION>Required Options:
--os- Operating system:linux,windows,macos--size- Sandbox size:small,medium,large--region- Region:north-america,europe,asia-pacific,south-america
Examples:
# Create a small Linux sandbox in North America
cua create --os linux --size small --region north-america
# Create a medium Windows sandbox in Europe
cua create --os windows --size medium --region europe
# Create a large macOS sandbox in Asia Pacific
cua create --os macos --size large --region asia-pacificResponse Types:
Immediate (Status 200):
Sandbox created and ready: my-new-sandbox-abc123
Password: secure-password-here
Host: my-new-sandbox-abc123.sandbox.cua.aiProvisioning (Status 202):
Sandbox provisioning started: my-new-sandbox-abc123
Job ID: job-xyz789
Use 'cua list' to monitor provisioning progresscua start
Start a stopped sandbox.
cua start <name>Example:
$ cua start my-dev-sandbox
Start acceptedcua stop
Stop a running sandbox.
cua stop <name>Example:
$ cua stop my-dev-sandbox
stoppingcua restart
Restart a sandbox.
cua restart <name>Example:
$ cua restart my-dev-sandbox
restartingcua delete
Delete a sandbox permanently.
cua delete <name>Example:
$ cua delete old-test-sandbox
Sandbox deletion initiated: deletingThis action is irreversible. All data on the sandbox will be permanently lost.
cua vnc
Open the VNC interface for a sandbox in your browser.
cua vnc <name>
# Alternative alias
cua open <name>Example:
$ cua vnc my-dev-sandbox
Opening NoVNC: https://my-dev-sandbox.sandbox.cua.ai/vnc.html?autoconnect=true&password=...This command automatically opens your default browser to the VNC interface with the correct password pre-filled.
Global Options
Help
Get help for any command:
cua --help
cua auth login --help
cua create --help
cua list --helpError Handling
The CLI provides clear error messages for common issues:
Authentication Errors
$ cua list
Unauthorized. Try 'cua auth login' again.Sandbox Not Found
$ cua start nonexistent-sandbox
Sandbox not foundInvalid Configuration
$ cua create --os invalid --configuration small --region north-america
Invalid request or unsupported configurationTips and Best Practices
1. Use Descriptive Sandbox Names
# Good
cua create --os linux --size small --region north-america
# Then rename or use meaningful names in the dashboard
# Better workflow
cua list # Check the generated name
# Use that name consistently2. Environment Management
# Set up your project with API key
cd my-project
cua auth env
# Now your project has CUA_API_KEY in .env3. Quick Sandbox Access
# Create aliases for frequently used sandboxes
alias dev-sandbox="cua vnc my-development-sandbox"
alias prod-sandbox="cua vnc my-production-sandbox"4. Monitoring Provisioning
# For sandboxes that need provisioning time
cua create --os windows --size large --region europe
# Sandbox provisioning started: my-sandbox-abc123
# Job ID: job-xyz789
# Check status periodically
watch -n 5 cua listNext Steps
Was this page helpful?