Loading...
Loading...
Manage cloud development sandboxes with cloudrouter. Create, sync, and access remote VMs with GPU support, Docker, and browser automation. Use when asked to create a sandbox, spin up a dev environment, run code in the cloud, use GPUs, automate a browser, or interact with remote VMs.
npx skill4agent add karlorz/cloudrouter cloudrouter/cloudrouter/crcloudrouter - Cloud Development Sandboxes
Modes:
cloudrouter start . Sync current directory to a cloud sandbox
cloudrouter start --size small . Smaller sandbox (2 vCPU, 8 GB)
cloudrouter start --gpu T4 . Sandbox with T4 GPU (16GB VRAM)
cloudrouter start --gpu A100 . Sandbox with A100 GPU (40GB VRAM)
cloudrouter start --gpu H100 . Sandbox with H100 GPU (80GB VRAM)
Manage:
cloudrouter ls List all sandboxes
cloudrouter code <id> Open VS Code in browser
cloudrouter jupyter <id> Open Jupyter Lab in browser
cloudrouter pty <id> Open terminal session
cloudrouter vnc <id> Open VNC desktop
cloudrouter stop <id> Pause sandbox
cloudrouter resume <id> Resume paused sandbox
Browser automation:
cloudrouter browser snapshot -i <id> Get interactive elements
cloudrouter browser open <id> <url> Navigate to URL
cloudrouter browser screenshot <id> Take screenshot
Run "cloudrouter start --help" for all options.npm install -g @karlorz/cloudrouter # Install/update CLIcloudroutercrcloudrouter logincloudrouter logincloudrouter login # Authenticate (opens browser)
cloudrouter start . # Create sandbox from current directory
cloudrouter start --gpu T4 . # Create sandbox with GPU
cloudrouter start --size small . # Create smaller sandbox
cloudrouter code <id> # Open VS Code
cloudrouter jupyter <id> # Open Jupyter Lab
cloudrouter pty <id> # Open terminal session
cloudrouter ls # List all sandboxesPreferred: Always useorcloudrouter start .to sync your local directory to a cloud sandbox. This is the recommended workflow over cloning from a git repo.cloudrouter start <local-path>
cloudrouter login # Login (opens browser)
cloudrouter logout # Logout and clear credentials
cloudrouter whoami # Show current user and team# Standard sandbox (syncs local directory) — DO NOT pass --size, default is large (8 vCPU, 32 GB)
cloudrouter start . # Create from current directory (recommended)
cloudrouter start ./my-project # Create from a specific local directory
cloudrouter start -o . # Create and open VS Code immediately
cloudrouter start -n my-sandbox . # Create with a custom name
# Size presets — only use if the user specifically requests a different size
cloudrouter start --size small . # 2 vCPU, 8 GB RAM, 20 GB disk — only if user asks
cloudrouter start --size medium . # 4 vCPU, 16 GB RAM, 40 GB disk — only if user asks
cloudrouter start --size large . # 8 vCPU, 32 GB RAM, 80 GB disk (DEFAULT — no flag needed)
cloudrouter start --size xlarge . # 16 vCPU, 64 GB RAM, 160 GB disk — only if user asks
# With GPU (auto-selects Modal provider)
cloudrouter start --gpu T4 . # T4 GPU (16GB VRAM)
cloudrouter start --gpu L4 . # L4 GPU (24GB VRAM)
cloudrouter start --gpu A10G . # A10G GPU (24GB VRAM)
cloudrouter start --gpu A100 . # A100 GPU (40GB VRAM) - requires approval
cloudrouter start --gpu H100 . # H100 GPU (80GB VRAM) - requires approval
cloudrouter start --gpu H100:2 . # Multi-GPU: 2x H100
# With custom resources (override --size values)
cloudrouter start --cpu 12 --memory 49152 . # Custom CPU and memory
cloudrouter start --disk 100 . # Custom disk size (GB)
cloudrouter start --image ubuntu:22.04 . # Custom container image
# From git repo (URL as positional arg or --git flag)
cloudrouter start https://github.com/user/repo # Clone git repo directly
cloudrouter start --git user/repo # Clone via shorthand
cloudrouter start --git user/repo -b main # Clone specific branch
# Provider selection
cloudrouter start -p e2b . # Use E2B provider (default)
cloudrouter start -p modal . # Use Modal provider
# Custom timeout
cloudrouter start --timeout 1800 . # 30-minute timeout (default: 600s = 10 min)| Size | vCPU | RAM | Disk | Notes |
|---|---|---|---|---|
| small | 2 | 8 GB | 20 GB | Light tasks |
| medium | 4 | 16 GB | 40 GB | Standard development |
| large | 8 | 32 GB | 80 GB | Default |
| xlarge | 16 | 64 GB | 160 GB | Heavy workloads |
--sizelarge--size small--cpu--memory--disk--size| GPU | VRAM | Best For | Availability |
|---|---|---|---|
| T4 | 16GB | Inference, fine-tuning small models | Self-serve |
| L4 | 24GB | Inference, image generation | Self-serve |
| A10G | 24GB | Training medium models | Self-serve |
| L40S | 48GB | Inference, video generation | Requires approval |
| A100 | 40GB | Training large models (7B-70B) | Requires approval |
| A100-80GB | 80GB | Very large models | Requires approval |
| H100 | 80GB | Fast training, research | Requires approval |
| H200 | 141GB | Maximum memory capacity | Requires approval |
| B200 | 192GB | Latest gen, frontier models | Requires approval |
:N--gpu H100:2start-n, --name <name> Name for the sandbox
-o, --open Open VS Code after creation
--size <preset> Machine size: small, medium, large (default), xlarge
--gpu <type> GPU type (T4, L4, A10G, L40S, A100, H100, H200, B200)
--cpu <cores> CPU cores (overrides --size)
--memory <MiB> Memory in MiB (overrides --size)
--disk <GB> Disk size in GB (overrides --size)
--image <image> Container image (e.g., ubuntu:22.04)
--git <repo> Git repository URL or user/repo shorthand
-b, --branch <branch> Git branch to clone
-p, --provider <name> Sandbox provider: e2b (default), modal
-T, --template <id> Template ID — DO NOT use template names from `cloudrouter templates`; use --gpu flags instead
--timeout <secs> Sandbox timeout in seconds (default: 600 = 10 minutes)Warning: Do NOT pass template names (e.g.) to thecmux-devbox-baseflag. These are display names, not valid template IDs.-T
Aliases:,cloudrouter start,cloudrouter createall do the same thing.cloudrouter new
cloudrouter ls # List all sandboxes
cloudrouter ls -p modal # List only GPU sandboxes
cloudrouter ls -p e2b # List only Docker sandboxes
cloudrouter status <id> # Show sandbox details and URLs
cloudrouter stop <id> # Pause sandbox (preserves state, can resume)
cloudrouter pause <id> # Same as stop — alias
cloudrouter resume <id> # Resume a paused sandbox
cloudrouter extend <id> # Extend sandbox timeout (default: +1 hour)
cloudrouter extend <id> --seconds 7200 # Extend by 2 hours
cloudrouter delete <id> # Delete sandbox permanently
cloudrouter templates # List available templatesImportant:andstopare the same command — they preserve sandbox state. Usepauseto bring a paused sandbox back. Useresume(aliases:delete,rm) to permanently destroy a sandbox.kill
Do NOT usewith--timeout— the flag isextend.--seconds
cloudrouter code <id> # Open VS Code in browser
cloudrouter jupyter <id> # Open Jupyter Lab in browser
cloudrouter vnc <id> # Open VNC desktop in browser
cloudrouter pty <id> # Interactive terminal sessioncloudrouter pty <id> # Interactive terminal session (use for ongoing work)
cloudrouter ssh <id> <command> # Execute a one-off command via SSH
cloudrouter ssh <id> "ls -la" # Run a command (always quote the command string)
cloudrouter pty-list <id> # List active PTY sessionsImportant: Preferfor interactive work. Usecloudrouter ptyfor quick one-off commands.cloudrouter sshCRITICAL: Always quote the command string.will FAIL becausecloudrouter ssh <id> ls -lais parsed as a cloudrouter flag. Always wrap in quotes:-la.cloudrouter ssh <id> "ls -la"
npm installcloudrouter ssh <id> "sudo chown -R 1000:1000 /home/user/.npm"npm install.npm/_cacachecloudrouter upload <id> [local-path]cloudrouter download <id> [local-path]-r <remote-path>/home/user/workspace-r# Upload (local -> sandbox)
cloudrouter upload <id> # Upload current dir to /home/user/workspace
cloudrouter upload <id> ./my-project # Upload directory to workspace
cloudrouter upload <id> ./config.json # Upload single file to workspace
cloudrouter upload <id> . -r /home/user/app # Upload to specific remote path
cloudrouter upload <id> . --watch # Watch and re-upload on changes
cloudrouter upload <id> . --delete # Delete remote files not present locally
cloudrouter upload <id> . -e "*.log" # Exclude patterns
cloudrouter upload <id> . --dry-run # Preview without making changes
# Download (sandbox -> local)
cloudrouter download <id> # Download workspace to current dir
cloudrouter download <id> ./output # Download workspace to ./output
cloudrouter download <id> ./output -r /home/user/app # Download specific remote dir to ./outputWarning: Theflag expects a directory path, not a file path. To download a single file, download its parent directory and then access the file locally.-rCommon mistake:— this passes 3 positional args and will fail. Usecloudrouter download <id> /remote/path /local/pathinstead.cloudrouter download <id> /local/path -r /remote/path
cloudrouter browsercloudrouter browserStartup delay: The browser may not be ready immediately after sandbox creation. If acommand fails right afterbrowser, wait a few seconds and retry.cloudrouter start
cloudrouter browser open <id> <url> # Navigate to URL
cloudrouter browser back <id> # Navigate back
cloudrouter browser forward <id> # Navigate forward
cloudrouter browser reload <id> # Reload page
cloudrouter browser url <id> # Get current URL
cloudrouter browser title <id> # Get page titlecloudrouter browser snapshot -i <id> # Interactive elements only (RECOMMENDED)
cloudrouter browser snapshot <id> # Full accessibility tree
cloudrouter browser snapshot -c <id> # Compact output
cloudrouter browser screenshot <id> # Take screenshot (base64 to stdout)
cloudrouter browser screenshot <id> out.png # Save screenshot to file
cloudrouter browser screenshot <id> --full # Full page screenshotcloudrouter browser click <id> @e1 # Click element by ref
cloudrouter browser click <id> "#submit" # Click by CSS selector
cloudrouter browser dblclick <id> @e1 # Double-click element
cloudrouter browser fill <id> @e2 "user@email.com" # Clear input and fill value
cloudrouter browser type <id> @e3 "some text" # Type without clearing (appends)
cloudrouter browser press <id> Enter # Press key (Enter, Tab, Escape, etc.)
cloudrouter browser hover <id> @e4 # Hover over element
cloudrouter browser focus <id> @e5 # Focus element
cloudrouter browser scroll <id> down 500 # Scroll (up/down/left/right, optional px)
cloudrouter browser scrollintoview <id> "#element" # Scroll element into view (CSS selector only, NOT @e refs)
cloudrouter browser select <id> @e7 "option-value" # Select dropdown option
cloudrouter browser check <id> @e8 # Check checkbox
cloudrouter browser uncheck <id> @e9 # Uncheck checkbox
cloudrouter browser upload <id> @e10 /tmp/file.pdf # Upload file to file input
cloudrouter browser drag <id> @e1 @e2 # Drag and dropcloudrouter browser wait <id> @e1 # Wait for element to appear
cloudrouter browser wait <id> 2000 # Wait millisecondscloudrouter browser get-text <id> @e1 # Get element text content
cloudrouter browser get-value <id> @e2 # Get input value
cloudrouter browser get-attr <id> @e3 href # Get specific attribute
cloudrouter browser get-html <id> @e4 # Get innerHTML
cloudrouter browser get-count <id> ".item" # Count matching elements
cloudrouter browser get-box <id> @e5 # Get bounding box
cloudrouter browser is-visible <id> @e1 # Check if element is visible
cloudrouter browser is-enabled <id> @e1 # Check if element is enabled
cloudrouter browser is-checked <id> @e1 # Check if checkbox is checkedcloudrouter browser find <id> text "Sign In" click # Find by visible text and click
cloudrouter browser find <id> label "Email" fill "user@test.com" # Find by label and fill
cloudrouter browser find <id> placeholder "Search" type "query" # Find by placeholder
cloudrouter browser find <id> testid "submit-btn" click # Find by data-testidNote:finds the FIRST button on the page — it cannot filter by button name. Usefind <id> role button clickto target a specific button by its visible text. There is nofind <id> text "Button Name" clickflag.--name
cloudrouter browser eval <id> "document.title" # Evaluate JavaScript
cloudrouter browser console <id> # View console messages
cloudrouter browser errors <id> # View JavaScript errorscloudrouter browser tab-list <id> # List open tabs
cloudrouter browser tab-new <id> "https://..." # Open new tab
cloudrouter browser tab-switch <id> 2 # Switch to tab by index
cloudrouter browser tab-close <id> # Close current tab
cloudrouter browser frame <id> "#iframe-selector" # Switch to iframe
cloudrouter browser frame <id> main # Switch back to main framecloudrouter browser cookies <id> # List cookies
cloudrouter browser cookies-set <id> name value # Set a cookie
cloudrouter browser cookies-clear <id> # Clear all cookies
cloudrouter browser storage-local <id> # Get all localStorage
cloudrouter browser storage-local <id> key # Get specific key
cloudrouter browser storage-local-set <id> k v # Set localStorage value
cloudrouter browser storage-local-clear <id> # Clear localStoragecloudrouter browser state-save <id> /tmp/auth.json # Save cookies, storage, auth state
cloudrouter browser state-load <id> /tmp/auth.json # Restore saved statecloudrouter browser set-viewport <id> 1920 1080 # Set viewport size
cloudrouter browser set-device <id> "iPhone 14" # Emulate device
cloudrouter browser set-geo <id> 37.7749 -122.4194 # Set geolocation
cloudrouter browser set-offline <id> on # Toggle offline mode
cloudrouter browser set-media <id> dark # Emulate color scheme (dark/light)cloudrouter browser network-route <id> "**/api/*" # Intercept requests
cloudrouter browser network-route <id> "**/ads/*" --abort # Block requests
cloudrouter browser network-unroute <id> # Remove all routes
cloudrouter browser network-requests <id> # List tracked requestscloudrouter browser dialog-accept <id> # Accept alert/confirm/prompt
cloudrouter browser dialog-accept <id> "answer" # Accept prompt with text
cloudrouter browser dialog-dismiss <id> # Dismiss dialog@e1@e2@e3cloudrouter browser snapshot -i#id.classbutton[type="submit"][ref=e1]@@e1cloudrouter browser snapshot -i <id>cloudrouter browser snapshot <id> -i-i-c--full@e1cloudrouter browser snapshot -i <id>snapshotsnapshot -i-i-i-isnapshot -i-i-ifilltypefilltypecloudrouter browser wait <id> 2000urltitlecloudrouter browser state-save <id> /tmp/auth.jsonstate-loadcloudrouter browser find <id> text "Submit" clickNote:commands run agent-browser inside the sandbox via SSH. Always usecloudrouter browsercommands for browser automation.cloudrouter browser
cr_abc12345cloudrouter lscloudrouter startcloudrouter start ./my-project # Creates sandbox, uploads files
cloudrouter ssh cr_abc123 "sudo chown -R 1000:1000 /home/user/.npm" # ⚠ MUST run before any npm command
cloudrouter ssh cr_abc123 "cd /home/user/workspace && npm install" # Install dependencies
cloudrouter code cr_abc123 # Open VS Code
cloudrouter pty cr_abc123 # Open terminal (e.g. npm run dev)cloudrouter start --gpu A100 ./ml-project # Sandbox with A100 GPU
cloudrouter pty cr_abc123 # Open terminal
# Inside: pip install -r requirements.txt && python train.py
cloudrouter download cr_abc123 ./checkpoints # Download trained modelcloudrouter start ./notebooks # Create sandbox
cloudrouter jupyter cr_abc123 # Open Jupyter Lab in browsercloudrouter upload cr_abc123 ./my-project # Push local files to sandbox
# ... do work in sandbox ...
cloudrouter download cr_abc123 ./output # Pull files from sandbox to localcloudrouter browser open cr_abc123 "https://example.com/login"
cloudrouter browser snapshot -i cr_abc123
# Output: @e1 [input type="email"] placeholder="Email"
# @e2 [input type="password"] placeholder="Password"
# @e3 [button] "Sign In"
cloudrouter browser fill cr_abc123 @e1 "user@example.com"
cloudrouter browser fill cr_abc123 @e2 "password123"
cloudrouter browser click cr_abc123 @e3
cloudrouter browser wait cr_abc123 2000 # Wait for navigation
cloudrouter browser snapshot -i cr_abc123 # Re-snapshot after navigation!
cloudrouter browser screenshot cr_abc123 /tmp/result.pngcloudrouter browser open cr_abc123 "https://example.com/data"
cloudrouter browser wait cr_abc123 2000
cloudrouter browser snapshot -i cr_abc123 # Get interactive elements
cloudrouter browser get-text cr_abc123 @e5 # Extract specific element text
cloudrouter browser screenshot cr_abc123 # Visual capturecloudrouter stop cr_abc123 # Pause (preserves state)
# ... later ...
cloudrouter resume cr_abc123 # Resume where you left offcloudrouter lscloudrouter extend <id>--seconds <N>--timeoutextendcloudrouter extend cr_abc123 --seconds 1800cloudrouter stop <id>cloudrouter delete <id>cloudrouter resume <id>cloudrouter stopcloudrouter delete <id>cloudrouter lscloudrouter ls # Check running sandboxes and count
cloudrouter extend cr_abc123 # Extend by 1 hour (default)
cloudrouter extend cr_abc123 --seconds 3600 # Extend by custom duration
# ... share URLs, let user verify ...
cloudrouter stop cr_abc123 # Pause when done (can resume later)
cloudrouter delete cr_abc123 # Delete only if clearly disposablecloudrouter code <id>cloudrouter vnc <id>cloudrouter jupyter <id>cloudrouter browser screenshot <id> /tmp/out.pnghttps://5173-xxx.e2b.apphttps://5173-xxx.e2b.apphttps://3000-xxx.e2b.apphttps://<port>-xxx.e2b.appcloudrouter vnc <id>?tkn=cloudrouter code <id>cloudrouter vnc <id>cloudrouter jupyter <id>Dev server running on port 5173
View it in your sandbox's VNC desktop: cloudrouter vnc <id>
(The browser inside VNC can access http://localhost:5173)Frontend: https://5173-xxx.e2b.app <- WRONG: publicly accessible, no auth| Issue | Fix |
|---|---|
| ALWAYS run |
| Always quote the command: |
| Flags go BEFORE the ID: |
Browser commands fail right after | Wait a few seconds — Chrome needs time to boot |
| Use |
| Use |
Refs from | Don't mix modes — stick to |
| Dev server running but can't access it | Use |
Long-running | Use |
| |
| |
| File saves inside the sandbox (e.g. |
| Use |
| Stale ref error after DOM change | Always re-snapshot after clicks/form submits. Error says "timed out" — means ref is stale |
| The VM likely died. Use |
| Interactive prompts don't work in |
-t, --team <team> Team slug (overrides default)
-v, --verbose Verbose output