| name | cmux |
| description | Manage cloud development sandboxes with cmux. Create, sync, and access remote VMs. Includes browser automation via Chrome CDP for scraping, testing, and web interaction. |
cmux - Cloud Sandboxes for Development
cmux manages cloud sandboxes for development. Use these commands to create, manage, and access remote development environments with built-in browser automation.
Installation
npm install -g cmux
Quick Start
cmux login
cmux start ./my-project
cmux start .
cmux code <id>
cmux pty <id>
cmux upload <id> ./my-project
cmux download <id> ./output
cmux computer screenshot <id>
cmux stop <id>
cmux delete <id>
cmux ls
Preferred: Always use cmux start . or cmux start <local-path> to sync your local directory to a cloud sandbox. This is the recommended workflow over cloning from a git repo.
Commands
Authentication
cmux login
cmux logout
cmux whoami
Sandbox Lifecycle
cmux start .
cmux start ./my-project
cmux start -o .
cmux start --git user/repo
cmux start --docker
cmux ls
cmux status <id>
cmux stop <id>
cmux extend <id>
cmux delete <id>
cmux templates
Access Sandbox
cmux code <id>
cmux vnc <id>
cmux pty <id>
Work with Sandbox
cmux pty <id>
cmux exec <id> <command>
Important: Prefer cmux pty for interactive work. Use cmux exec only for quick one-off commands.
File Transfer
Upload and download files or directories between local machine and sandbox.
cmux upload <id>
cmux upload <id> ./my-project
cmux upload <id> ./config.json
cmux upload <id> . -r /home/user/app
cmux upload <id> . --watch
cmux upload <id> . --delete
cmux upload <id> . -e "*.log"
cmux download <id>
cmux download <id> ./output
cmux download <id> . -r /home/user/app
Browser Automation (cmux computer)
Control Chrome browser via CDP in the sandbox's VNC desktop.
Navigation
cmux computer open <id> <url>
cmux computer back <id>
cmux computer forward <id>
cmux computer reload <id>
cmux computer url <id>
cmux computer title <id>
Inspect Page
cmux computer snapshot <id>
cmux computer screenshot <id>
cmux computer screenshot <id> out.png
Interact with Elements
cmux computer click <id> <selector>
cmux computer type <id> "text"
cmux computer fill <id> <sel> "value"
cmux computer press <id> <key>
cmux computer hover <id> <selector>
cmux computer scroll <id> [direction]
cmux computer wait <id> <selector>
Element Selectors
Two ways to select elements:
- Element refs from snapshot:
@e1, @e2, @e3...
- CSS selectors:
#id, .class, button[type="submit"]
Sandbox IDs
Sandbox IDs look like cmux_abc12345. Use the full ID when running commands. Get IDs from cmux ls or cmux start output.
Common Workflows
Create and develop in a sandbox (preferred: local-to-cloud)
cmux start ./my-project
cmux code cmux_abc123
cmux pty cmux_abc123
File transfer workflow
cmux upload cmux_abc123 ./my-project
cmux download cmux_abc123 ./output
Browser automation: Login to a website
cmux computer open cmux_abc123 "https://example.com/login"
cmux computer snapshot cmux_abc123
cmux computer fill cmux_abc123 @e1 "user@example.com"
cmux computer fill cmux_abc123 @e2 "password123"
cmux computer click cmux_abc123 @e3
cmux computer screenshot cmux_abc123 result.png
Browser automation: Scrape data
cmux computer open cmux_abc123 "https://example.com/data"
cmux computer snapshot cmux_abc123
cmux computer screenshot cmux_abc123
Clean up
cmux stop cmux_abc123
cmux delete cmux_abc123
Security: Dev Server URLs
CRITICAL: NEVER share or output raw E2B port-forwarded URLs.
When a dev server runs in the sandbox (e.g., Vite on port 5173, Next.js on port 3000), E2B creates publicly accessible URLs like https://5173-xxx.e2b.app. These URLs have NO authentication — anyone with the link can access the running application.
Rules:
- NEVER output URLs like
https://5173-xxx.e2b.app, https://3000-xxx.e2b.app, or any https://<port>-xxx.e2b.app URL
- NEVER construct or guess E2B port URLs from sandbox metadata
- ALWAYS tell the user to view dev servers through VNC:
cmux vnc <id>
- VNC is protected by token authentication (
?tkn=) and is the only safe way to view dev server output
- Only VSCode URLs (
cmux code <id>) and VNC URLs (cmux vnc <id>) should be shared — these have proper token auth
When a dev server is started:
✓ Dev server running on port 5173
View it in your sandbox's VNC desktop: cmux vnc <id>
(The browser inside VNC can access http://localhost:5173)
NEVER do this:
Frontend: https://5173-xxx.e2b.app ← WRONG: publicly accessible, no auth
Tips
- Run
cmux login first if not authenticated
- Use
--json flag for machine-readable output
- Use
-t <team> to override default team
- Use
-v for verbose output
- Always run
snapshot first to see available elements before browser automation
- Use element refs (
@e1) for reliability over CSS selectors