cmux

📁 manaflow-ai/cmux 📅 9 days ago
61
总安装量
4
周安装量
#6622
全站排名
安装命令
npx skills add https://github.com/manaflow-ai/cmux --skill cmux

Agent 安装分布

opencode 4
codex 4
amp 3
kimi-cli 3
claude-code 3

Skill 文档

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                      # Authenticate (opens browser)
cmux start ./my-project         # Create sandbox, upload directory → returns ID
cmux code <id>                  # Open VS Code
cmux pty <id>                   # Open terminal session
cmux upload <id> ./my-project   # Upload files/directories to sandbox
cmux download <id> ./output     # Download files from sandbox
cmux computer screenshot <id>   # Take browser screenshot
cmux stop <id>                  # Stop sandbox
cmux delete <id>                # Delete sandbox
cmux ls                         # List all sandboxes

Commands

Authentication

cmux login               # Login (opens browser)
cmux logout              # Logout and clear credentials
cmux whoami              # Show current user and team

Sandbox Lifecycle

cmux start [path]        # Create sandbox, optionally upload directory
cmux start -o [path]     # Create and open VS Code immediately
cmux start --docker      # Create sandbox with Docker support
cmux start --git user/repo  # Clone a git repo into sandbox
cmux ls                  # List all sandboxes
cmux status <id>         # Show sandbox details and URLs
cmux stop <id>           # Stop sandbox
cmux extend <id>         # Extend sandbox timeout
cmux delete <id>         # Delete sandbox permanently
cmux templates           # List available templates

Access Sandbox

cmux code <id>           # Open VS Code in browser
cmux vnc <id>            # Open VNC desktop in browser
cmux pty <id>            # Interactive terminal session

Work with Sandbox

cmux pty <id>                  # Interactive terminal session (use this to run commands)
cmux exec <id> <command>       # Execute a one-off 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.

# Upload (local → sandbox)
cmux upload <id>                            # Upload current dir to /home/user/workspace
cmux upload <id> ./my-project               # Upload directory to workspace
cmux upload <id> ./config.json              # Upload single file to workspace
cmux upload <id> . -r /home/user/app        # Upload to specific remote path
cmux upload <id> . --watch                  # Watch and re-upload on changes
cmux upload <id> . --delete                 # Delete remote files not present locally
cmux upload <id> . -e "*.log"              # Exclude patterns

# Download (sandbox → local)
cmux download <id>                          # Download workspace to current dir
cmux download <id> ./output                 # Download workspace to ./output
cmux download <id> . -r /home/user/app      # Download from specific remote path

Browser Automation (cmux computer)

Control Chrome browser via CDP in the sandbox’s VNC desktop.

Navigation

cmux computer open <id> <url>    # Navigate to URL
cmux computer back <id>          # Navigate back
cmux computer forward <id>       # Navigate forward
cmux computer reload <id>        # Reload page
cmux computer url <id>           # Get current URL
cmux computer title <id>         # Get page title

Inspect Page

cmux computer snapshot <id>             # Get accessibility tree with element refs (@e1, @e2...)
cmux computer screenshot <id>           # Take screenshot (base64 to stdout)
cmux computer screenshot <id> out.png   # Save screenshot to file

Interact with Elements

cmux computer click <id> <selector>      # Click element (@e1 or CSS selector)
cmux computer type <id> "text"           # Type into focused element
cmux computer fill <id> <sel> "value"    # Clear input and fill with value
cmux computer press <id> <key>           # Press key (Enter, Tab, Escape, etc.)
cmux computer hover <id> <selector>      # Hover over element
cmux computer scroll <id> [direction]    # Scroll page (up/down/left/right)
cmux computer wait <id> <selector>       # Wait for element to appear

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

cmux start ./my-project        # Creates sandbox, uploads files
cmux code cmux_abc123          # Open VS Code
cmux pty cmux_abc123           # Open terminal to run commands (e.g. npm install && npm run dev)

File transfer workflow

cmux upload cmux_abc123 ./my-project     # Push local files to sandbox
# ... do work in sandbox ...
cmux download cmux_abc123 ./output       # Pull files from sandbox to local

Browser automation: Login to a website

cmux computer open cmux_abc123 "https://example.com/login"
cmux computer snapshot cmux_abc123
# Output: @e1 [input] Email, @e2 [input] Password, @e3 [button] Sign In

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   # Get structured accessibility tree
cmux computer screenshot cmux_abc123 # Visual capture

Clean up

cmux stop cmux_abc123      # Stop (can restart later)
cmux delete cmux_abc123    # Delete permanently

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