cloudrouter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cloudrouter - Cloud Sandboxes for Development

cloudrouter - 云开发沙箱

cloudrouter manages cloud sandboxes for development. Use these commands to create, manage, and access remote development environments with GPU support, Docker, and browser automation.
cloudrouter用于管理云开发沙箱。使用以下命令创建、管理并访问支持GPU、Docker和浏览器自动化的远程开发环境。

When this skill is invoked

触发此技能的场景

When the user invokes
/cloudrouter
or
/cr
without a specific task, present the available modes:
cloudrouter - Cloud Development Sandboxes

  Modes:
    cloudrouter start .                    Sync current directory to a cloud sandbox
    cloudrouter start --docker .           Sandbox with Docker support
    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 pty <id>                   Open terminal session
    cloudrouter vnc <id>                   Open VNC desktop
    cloudrouter stop <id>                  Stop sandbox

  Browser automation:
    cloudrouter computer open <id> <url>   Navigate to URL
    cloudrouter computer snapshot <id>     Get accessibility tree
    cloudrouter computer screenshot <id>   Take screenshot

  Run "cloudrouter start --help" for all options.
当用户调用
/cloudrouter
/cr
且未指定具体任务时,展示可用模式:
cloudrouter - Cloud Development Sandboxes

  Modes:
    cloudrouter start .                    Sync current directory to a cloud sandbox
    cloudrouter start --docker .           Sandbox with Docker support
    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 pty <id>                   Open terminal session
    cloudrouter vnc <id>                   Open VNC desktop
    cloudrouter stop <id>                  Stop sandbox

  Browser automation:
    cloudrouter computer open <id> <url>   Navigate to URL
    cloudrouter computer snapshot <id>     Get accessibility tree
    cloudrouter computer screenshot <id>   Take screenshot

  Run "cloudrouter start --help" for all options.

Installation

安装步骤

If cloudrouter is not installed, help the user install it:
bash
npm install -g @manaflow-ai/cloudrouter
This installs both
cloudrouter
and
cr
(shorthand) as CLI commands.
Then authenticate:
bash
cloudrouter login
If the user hasn't logged in yet, prompt them to run
cloudrouter login
first before using any other commands.
如果未安装cloudrouter,帮助用户完成安装:
bash
npm install -g @manaflow-ai/cloudrouter
此命令会将
cloudrouter
和简写形式
cr
作为CLI命令全局安装。
然后进行身份验证:
bash
cloudrouter login
如果用户尚未登录,提示他们先运行
cloudrouter login
,再使用其他命令。

Quick Start

快速开始

bash
cloudrouter login                        # Authenticate (opens browser)
cloudrouter start .                      # Create sandbox from current directory
cloudrouter start --gpu T4 .             # Create sandbox with GPU
cloudrouter start --docker .             # Create sandbox with Docker
cloudrouter code <id>                    # Open VS Code
cloudrouter pty <id>                     # Open terminal session
cloudrouter ls                           # List all sandboxes
Preferred: Always use
cloudrouter start .
or
cloudrouter start <local-path>
to sync your local directory to a cloud sandbox. This is the recommended workflow over cloning from a git repo.
bash
cloudrouter login                        # 身份验证(打开浏览器)
cloudrouter start .                      # 从当前目录创建沙箱
cloudrouter start --gpu T4 .             # 创建带GPU的沙箱
cloudrouter start --docker .             # 创建带Docker的沙箱
cloudrouter code <id>                    # 打开VS Code
cloudrouter pty <id>                     # 打开终端会话
cloudrouter ls                           # 列出所有沙箱
推荐用法: 始终使用
cloudrouter start .
cloudrouter start <local-path>
将本地目录同步到云沙箱。这是比从Git仓库克隆更推荐的工作流。

Commands

命令说明

Authentication

身份验证

bash
cloudrouter login               # Login (opens browser)
cloudrouter logout              # Logout and clear credentials
cloudrouter whoami              # Show current user and team
bash
cloudrouter login               # 登录(打开浏览器)
cloudrouter logout              # 登出并清除凭证
cloudrouter whoami              # 显示当前用户和团队信息

Creating Sandboxes

创建沙箱

bash
undefined
bash
undefined

Standard sandbox (syncs local directory)

标准沙箱(同步本地目录)

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
cloudrouter start . # 从当前目录创建(推荐) cloudrouter start ./my-project # 从指定本地目录创建 cloudrouter start -o . # 创建后立即打开VS Code cloudrouter start -n my-sandbox . # 创建自定义名称的沙箱

With Docker support

带Docker支持

cloudrouter start --docker . # Sandbox with Docker enabled
cloudrouter start --docker . # 启用Docker支持的沙箱

With GPU

带GPU

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
cloudrouter start --gpu T4 . # T4 GPU(16GB显存) cloudrouter start --gpu L4 . # L4 GPU(24GB显存) cloudrouter start --gpu A10G . # A10G GPU(24GB显存) cloudrouter start --gpu A100 . # A100 GPU(40GB显存)- 需要审批 cloudrouter start --gpu H100 . # H100 GPU(80GB显存)- 需要审批 cloudrouter start --gpu H100:2 . # 多GPU:2块H100

With custom resources

自定义资源配置

cloudrouter start --cpu 8 . # Custom CPU cores cloudrouter start --memory 16384 . # Custom memory (MiB) cloudrouter start --image ubuntu:22.04 . # Custom container image
cloudrouter start --cpu 8 . # 自定义CPU核心数 cloudrouter start --memory 16384 . # 自定义内存(MiB) cloudrouter start --image ubuntu:22.04 . # 自定义容器镜像

From git repo

从Git仓库创建

cloudrouter start --git user/repo # Clone a git repo into sandbox cloudrouter start --git user/repo -b main # Clone specific branch
cloudrouter start --git user/repo # 将Git仓库克隆到沙箱 cloudrouter start --git user/repo -b main # 克隆指定分支

Provider selection

选择服务商

cloudrouter start -p e2b . # Use E2B provider (default) cloudrouter start -p modal . # Use Modal provider
undefined
cloudrouter start -p e2b . # 使用E2B服务商(默认) cloudrouter start -p modal . # 使用Modal服务商
undefined

GPU Options

GPU选项

GPUVRAMBest ForAvailability
T416GBInference, fine-tuning small modelsSelf-serve
L424GBInference, image generationSelf-serve
A10G24GBTraining medium modelsSelf-serve
L40S48GBInference, video generationRequires approval
A10040GBTraining large models (7B-70B)Requires approval
A100-80GB80GBVery large modelsRequires approval
H10080GBFast training, researchRequires approval
H200141GBMaximum memory capacityRequires approval
B200192GBLatest gen, frontier modelsRequires approval
GPUs requiring approval: contact founders@manaflow.com.
Multi-GPU: append
:N
to the GPU type, e.g.
--gpu H100:2
for 2x H100.
GPU显存最佳适用场景可用权限
T416GB推理、小模型微调自助使用
L424GB推理、图像生成自助使用
A10G24GB中等模型训练自助使用
L40S48GB推理、视频生成需要审批
A10040GB大模型训练(7B-70B参数)需要审批
A100-80GB80GB超大规模模型需要审批
H10080GB快速训练、科研需要审批
H200141GB最大内存容量需求需要审批
B200192GB最新一代前沿模型需要审批
需要审批的GPU:联系founders@manaflow.com申请。
多GPU配置:在GPU类型后追加
:N
,例如
--gpu H100:2
表示2块H100。

All
start
Flags

所有
start
命令参数

-n, --name <name>       Name for the sandbox
-o, --open              Open VS Code after creation
    --docker            Enable Docker support (E2B only)
    --gpu <type>        GPU type (T4, L4, A10G, L40S, A100, H100, H200, B200)
    --cpu <cores>       CPU cores (e.g., 4, 8)
    --memory <MiB>      Memory in MiB (e.g., 8192, 65536)
    --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 (overrides --docker) — DO NOT use template names from `cloudrouter templates`; use --docker or --gpu flags instead
Warning: Do NOT pass template names (e.g.
cmux-devbox-base
) to the
-T
flag. These are display names, not valid E2B template IDs. Use
--docker
for Docker support and
--gpu <type>
for GPU support instead.
-n, --name <name>       沙箱名称
-o, --open              创建后自动打开VS Code
    --docker            启用Docker支持(仅E2B服务商)
    --gpu <type>        GPU类型(T4, L4, A10G, L40S, A100, H100, H200, B200)
    --cpu <cores>       CPU核心数(例如:4, 8)
    --memory <MiB>      内存大小(MiB,例如:8192, 65536)
    --image <image>     容器镜像(例如:ubuntu:22.04)
    --git <repo>        Git仓库URL或user/repo简写形式
-b, --branch <branch>   要克隆的Git分支
-p, --provider <name>   沙箱服务商:e2b(默认)、modal
-T, --template <id>     模板ID(会覆盖--docker参数)—— 请勿使用`cloudrouter templates`中的模板名称;请改用--docker或--gpu参数
警告: 请勿将模板名称(例如
cmux-devbox-base
)传递给
-T
参数。这些是显示名称,并非有效的E2B模板ID。如需Docker支持请使用
--docker
,如需GPU支持请使用
--gpu <type>

Managing Sandboxes

管理沙箱

bash
cloudrouter ls                  # List all sandboxes
cloudrouter status <id>         # Show sandbox details and URLs
cloudrouter stop <id>           # Stop sandbox (can restart later)
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 templates
bash
cloudrouter ls                  # 列出所有沙箱
cloudrouter status <id>         # 显示沙箱详情和URL
cloudrouter stop <id>           # 停止沙箱(可后续重启)
cloudrouter extend <id>         # 延长沙箱超时时间(默认:+1小时)
cloudrouter extend <id> --seconds 7200  # 延长2小时
cloudrouter delete <id>         # 永久删除沙箱
cloudrouter templates           # 列出可用模板

Access Sandbox

访问沙箱

bash
cloudrouter code <id>           # Open VS Code in browser
cloudrouter vnc <id>            # Open VNC desktop in browser
cloudrouter pty <id>            # Interactive terminal session
bash
cloudrouter code <id>           # 在浏览器中打开VS Code
cloudrouter vnc <id>            # 在浏览器中打开VNC桌面
cloudrouter pty <id>            # 交互式终端会话

Work with Sandbox

沙箱操作

bash
cloudrouter pty <id>                  # Interactive terminal session (use this to run commands)
cloudrouter exec <id> <command>       # Execute a one-off command
Important: Prefer
cloudrouter pty
for interactive work. Use
cloudrouter exec
only for quick one-off commands.
bash
cloudrouter pty <id>                  # 交互式终端会话(推荐用于执行命令)
cloudrouter exec <id> <command>       # 执行一次性命令
重要提示: 交互式工作优先使用
cloudrouter pty
。仅在执行快速一次性命令时使用
cloudrouter exec

File Transfer

文件传输

Upload and download files or directories between local machine and sandbox.
Command signatures:
  • cloudrouter upload <id> [local-path]
    — accepts 1-2 positional args: sandbox ID and optional local path
  • cloudrouter download <id> [local-path]
    — accepts 1-2 positional args: sandbox ID and optional local path
  • Use
    -r <remote-path>
    flag to specify a non-default remote directory (default:
    /home/user/workspace
    )
  • Do NOT pass remote paths as positional arguments — this will error. Always use the
    -r
    flag.
bash
undefined
在本地机器和沙箱之间上传、下载文件或目录。
命令格式:
  • cloudrouter upload <id> [local-path]
    — 接受1-2个位置参数:沙箱ID和可选的本地路径
  • cloudrouter download <id> [local-path]
    — 接受1-2个位置参数:沙箱ID和可选的本地路径
  • 使用
    -r <remote-path>
    参数指定非默认远程目录(默认:
    /home/user/workspace
  • 请勿将远程路径作为位置参数传递 — 这会导致错误。请始终使用
    -r
    参数。
bash
undefined

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> # 将当前目录上传到/home/user/workspace cloudrouter upload <id> ./my-project # 将目录上传到工作区 cloudrouter upload <id> ./config.json # 将单个文件上传到工作区 cloudrouter upload <id> . -r /home/user/app # 上传到指定远程路径 cloudrouter upload <id> . --watch # 监听文件变化并自动重新上传 cloudrouter upload <id> . --delete # 删除沙箱中本地不存在的文件 cloudrouter upload <id> . -e "*.log" # 排除指定模式的文件

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 ./output

> **Warning:** The `-r` flag expects a **directory** path, not a file path. To download a single file, download its parent directory and then access the file locally.
>
> **Common mistake:** `cloudrouter download <id> /remote/path /local/path` — this passes 3 positional args and will fail. Use `cloudrouter download <id> /local/path -r /remote/path` instead.
cloudrouter download <id> # 将工作区下载到当前目录 cloudrouter download <id> ./output # 将工作区下载到./output cloudrouter download <id> ./output -r /home/user/app # 将指定远程目录下载到./output

> **警告:** `-r`参数需要传入**目录**路径,而非文件路径。如需下载单个文件,请先下载其父目录,再在本地访问该文件。
>
> **常见错误:** `cloudrouter download <id> /remote/path /local/path` — 传入了3个位置参数,会执行失败。请改用`cloudrouter download <id> /local/path -r /remote/path`。

Browser Automation (cloudrouter computer)

浏览器自动化(cloudrouter computer)

Control Chrome browser via CDP in the sandbox's VNC desktop.
Startup delay: Chrome CDP may not be ready immediately after sandbox creation. If a
computer
command fails right after
cloudrouter start
, wait a few seconds and retry. This is rare but expected — Chrome needs a moment to boot inside the sandbox.
通过沙箱VNC桌面中的CDP控制Chrome浏览器。
启动延迟: 沙箱创建后,Chrome CDP可能无法立即就绪。如果
computer
命令在
cloudrouter start
后立即执行失败,请等待几秒后重试。这种情况很少见,但属于正常现象 — Chrome需要在沙箱中完成启动。

Navigation

导航操作

bash
cloudrouter computer open <id> <url>    # Navigate to URL
cloudrouter computer back <id>          # Navigate back
cloudrouter computer forward <id>       # Navigate forward
cloudrouter computer reload <id>        # Reload page
cloudrouter computer url <id>           # Get current URL
cloudrouter computer title <id>         # Get page title
bash
cloudrouter computer open <id> <url>    # 导航到指定URL
cloudrouter computer back <id>          # 后退
cloudrouter computer forward <id>       # 前进
cloudrouter computer reload <id>        # 刷新页面
cloudrouter computer url <id>           # 获取当前URL
cloudrouter computer title <id>         # 获取页面标题

Inspect Page

页面检查

bash
cloudrouter computer snapshot <id>             # Get accessibility tree with element refs (@e1, @e2...)
cloudrouter computer screenshot <id>           # Take screenshot (base64 to stdout)
cloudrouter computer screenshot <id> out.png   # Save screenshot to file
bash
cloudrouter computer snapshot <id>             # 获取带元素引用的可访问性树(@e1、@e2...)
cloudrouter computer screenshot <id>           # 截取屏幕截图(以base64格式输出到标准输出)
cloudrouter computer screenshot <id> out.png   # 将屏幕截图保存到文件

Interact with Elements

元素交互

bash
cloudrouter computer click <id> <selector>      # Click element (@e1 or CSS selector)
cloudrouter computer type <id> "text"           # Type into focused element
cloudrouter computer fill <id> <sel> "value"    # Clear input and fill with value
cloudrouter computer press <id> <key>           # Press key (Enter, Tab, Escape, etc.)
cloudrouter computer hover <id> <selector>      # Hover over element
cloudrouter computer scroll <id> [direction]    # Scroll page (up/down/left/right)
cloudrouter computer wait <id> <selector>       # Wait for element to appear
bash
cloudrouter computer click <id> <selector>      # 点击元素(@e1或CSS选择器)
cloudrouter computer type <id> "text"           # 在聚焦元素中输入文本
cloudrouter computer fill <id> <sel> "value"    # 清空输入框并填充值
cloudrouter computer press <id> <key>           # 按下按键(Enter、Tab、Escape等)
cloudrouter computer hover <id> <selector>      # 悬停在元素上
cloudrouter computer scroll <id> [direction]    # 滚动页面(上/下/左/右)
cloudrouter 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"]
两种元素选择方式:
  • 快照中的元素引用
    @e1
    @e2
    @e3
    ...
  • CSS选择器
    #id
    .class
    button[type="submit"]

Sandbox IDs

沙箱ID

Sandbox IDs look like
cr_abc12345
. Use the full ID when running commands. Get IDs from
cloudrouter ls
or
cloudrouter start
output.
沙箱ID格式为
cr_abc12345
。执行命令时请使用完整ID。可通过
cloudrouter ls
cloudrouter start
的输出获取ID。

Common Workflows

常见工作流

Create and develop in a sandbox (preferred: local-to-cloud)

创建并在沙箱中开发(推荐:本地到云端)

bash
cloudrouter start ./my-project        # Creates sandbox, uploads files
cloudrouter code cr_abc123            # Open VS Code
cloudrouter pty cr_abc123             # Open terminal to run commands (e.g. npm install && npm run dev)
bash
cloudrouter start ./my-project        # 创建沙箱并上传文件
cloudrouter code cr_abc123            # 打开VS Code
cloudrouter pty cr_abc123             # 打开终端执行命令(例如npm install && npm run dev)

GPU workflow: ML training

GPU工作流:机器学习训练

bash
cloudrouter start --gpu A100 ./ml-project    # Sandbox with A100 GPU
cloudrouter pty cr_abc123                    # Open terminal
bash
cloudrouter start --gpu A100 ./ml-project    # 创建带A100 GPU的沙箱
cloudrouter pty cr_abc123                    # 打开终端

Inside: pip install -r requirements.txt && python train.py

终端内执行:pip install -r requirements.txt && python train.py

cloudrouter download cr_abc123 ./checkpoints # Download trained model
undefined
cloudrouter download cr_abc123 ./checkpoints # 下载训练好的模型
undefined

Docker workflow

Docker工作流

bash
cloudrouter start --docker ./my-app          # Sandbox with Docker
cloudrouter pty cr_abc123                    # Open terminal
bash
cloudrouter start --docker ./my-app          # 创建带Docker的沙箱
cloudrouter pty cr_abc123                    # 打开终端

Inside: docker compose up -d

终端内执行:docker compose up -d

undefined
undefined

File transfer workflow

文件传输工作流

bash
cloudrouter upload cr_abc123 ./my-project     # Push local files to sandbox
bash
cloudrouter upload cr_abc123 ./my-project     # 将本地文件推送到沙箱

... do work in sandbox ...

... 在沙箱中完成工作 ...

cloudrouter download cr_abc123 ./output # Pull files from sandbox to local
undefined
cloudrouter download cr_abc123 ./output # 将沙箱文件拉取到本地
undefined

Browser automation: Login to a website

浏览器自动化:登录网站

bash
cloudrouter computer open cr_abc123 "https://example.com/login"
cloudrouter computer snapshot cr_abc123
bash
cloudrouter computer open cr_abc123 "https://example.com/login"
cloudrouter computer snapshot cr_abc123

Output: @e1 [input] Email, @e2 [input] Password, @e3 [button] Sign In

输出:@e1 [input] Email, @e2 [input] Password, @e3 [button] Sign In

cloudrouter computer fill cr_abc123 @e1 "user@example.com" cloudrouter computer fill cr_abc123 @e2 "password123" cloudrouter computer click cr_abc123 @e3 cloudrouter computer screenshot cr_abc123 result.png
undefined
cloudrouter computer fill cr_abc123 @e1 "user@example.com" cloudrouter computer fill cr_abc123 @e2 "password123" cloudrouter computer click cr_abc123 @e3 cloudrouter computer screenshot cr_abc123 result.png
undefined

Browser automation: Scrape data

浏览器自动化:数据爬取

bash
cloudrouter computer open cr_abc123 "https://example.com/data"
cloudrouter computer snapshot cr_abc123   # Get structured accessibility tree
cloudrouter computer screenshot cr_abc123 # Visual capture
bash
cloudrouter computer open cr_abc123 "https://example.com/data"
cloudrouter computer snapshot cr_abc123   # 获取结构化可访问性树
cloudrouter computer screenshot cr_abc123 # 视觉捕获页面

Sandbox Lifecycle & Cleanup

沙箱生命周期与清理

Concurrency limit: Users can have a maximum of 10 concurrently running sandboxes. If the user is approaching this limit, alert them and suggest cleaning up unused sandboxes. If they need a higher limit, they should contact founders@manaflow.ai (the CLI will also display this message when the limit is hit).
Cleanup rules — be careful and deliberate:
  1. Only touch sandboxes you created in this session. Never stop or delete sandboxes you didn't create or don't recognize. If you see unknown sandboxes in
    cloudrouter ls
    , leave them alone — they may belong to the user or another workflow.
  2. Extend before cleanup. Before stopping or deleting a sandbox you created, consider whether the user might want to inspect it. If you built something the user should see (a running app, a trained model, browser automation results, etc.), extend the sandbox with
    cloudrouter extend <id>
    so the user has time to check it out. Share the relevant URL (VS Code, VNC, etc.) so they can access it.
    • Use
      --seconds <N>
      to set a custom duration (default is 3600 = 1 hour). Do NOT use
      --timeout
      — that flag does not exist.
    • Example:
      cloudrouter extend cr_abc123 --seconds 1800
      extends by 30 minutes.
  3. Stop, don't delete, by default. Prefer
    cloudrouter stop <id>
    over
    cloudrouter delete <id>
    unless the sandbox is clearly disposable (e.g., a quick test that produced no artifacts). Stopped sandboxes can be restarted; deleted ones are gone forever.
  4. Clean up when you're done. When your task is complete and the user no longer needs the sandbox, stop it. Don't leave sandboxes running indefinitely — they count toward the concurrency limit.
  5. Monitor concurrency. Before creating a new sandbox, run
    cloudrouter ls
    to check how many are running. If there are 8+ active sandboxes, warn the user and ask if any can be stopped before creating another. Never silently hit the limit.
  6. If the limit is reached: Tell the user they've hit the 10-sandbox concurrency limit. Suggest stopping sandboxes they no longer need. If they need more capacity, direct them to contact founders@manaflow.ai to request a higher limit.
Cleanup workflow:
bash
cloudrouter 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
并发限制: 用户最多可同时运行10个沙箱。如果用户接近此限制,需提醒他们并建议清理未使用的沙箱。如需更高限制,请联系founders@manaflow.ai(当达到限制时,CLI也会显示此提示信息)。
清理规则 — 请谨慎操作:
  1. 仅操作本次会话创建的沙箱。 请勿停止或删除非本人创建或不熟悉的沙箱。如果在
    cloudrouter ls
    中看到未知沙箱,请忽略 — 它们可能属于用户或其他工作流。
  2. 清理前先延长超时。 在停止或删除本人创建的沙箱前,请考虑用户是否需要查看其中内容。如果您创建的沙箱中有用户需要查看的内容(例如运行中的应用、训练好的模型、浏览器自动化结果等),请使用
    cloudrouter extend <id>
    延长沙箱超时时间,以便用户有时间查看。同时分享相关URL(VS Code、VNC等)供用户访问。
    • 使用
      --seconds <N>
      设置自定义时长(默认3600秒=1小时)。请勿使用
      --timeout
      参数
      — 该参数不存在。
    • 示例:
      cloudrouter extend cr_abc123 --seconds 1800
      表示延长30分钟。
  3. 默认选择停止,而非删除。 优先使用
    cloudrouter stop <id>
    而非
    cloudrouter delete <id>
    ,除非沙箱明显是一次性的(例如快速测试且未产生任何成果)。已停止的沙箱可重启;已删除的沙箱则永久消失。
  4. 完成任务后清理。 当任务完成且用户不再需要沙箱时,请停止它。请勿让沙箱一直运行 — 它们会占用并发限制额度。
  5. 监控并发数。 创建新沙箱前,运行
    cloudrouter ls
    查看当前运行中的沙箱数量。如果已有8个及以上活跃沙箱,请提醒用户并询问是否可以停止部分沙箱后再创建新的。请勿静默触发限制。
  6. 达到限制时的处理: 告知用户已达到10个沙箱的并发限制。建议他们停止不再需要的沙箱。如需更高容量,请引导他们联系founders@manaflow.ai申请提升限制。
清理工作流:
bash
cloudrouter ls                  # 查看运行中的沙箱及数量
cloudrouter extend cr_abc123                # 延长1小时(默认)
cloudrouter extend cr_abc123 --seconds 3600 # 自定义延长时长

... share URLs, let user verify ...

... 分享URL,让用户确认 ...

cloudrouter stop cr_abc123 # Stop when done (can restart later) cloudrouter delete cr_abc123 # Delete only if clearly disposable
undefined
cloudrouter stop cr_abc123 # 完成后停止沙箱(可后续重启) cloudrouter delete cr_abc123 # 仅在沙箱为一次性时删除
undefined

Surfacing URLs and Screenshots

分享URL和截图

Proactively share authenticated sandbox URLs and screenshots with the user when it helps build trust or verify progress. The user cannot see what's happening inside the sandbox — showing them evidence of your work is important.
When to surface URLs:
  • After creating a sandbox or setting up an environment, share the VS Code URL (
    cloudrouter code <id>
    ) so the user can inspect the workspace
  • After deploying or starting a service, share the VNC URL (
    cloudrouter vnc <id>
    ) so the user can see it running
  • When Jupyter is running, share the Jupyter URL so the user can verify notebooks
  • Whenever the user might want to verify, inspect, or interact with the sandbox themselves
When to take and share screenshots:
  • After completing a visual task (e.g., UI changes, web app deployment) — take a screenshot with
    cloudrouter computer screenshot <id> out.png
    and show it
  • When something looks wrong or unexpected — screenshot it for the user to confirm
  • After browser automation steps that produce visible results (form submissions, page navigations, login flows)
  • When the user asks you to check or verify something visually
General rule: If you think the user would benefit from seeing proof of what you did, surface the URL or screenshot. Err on the side of showing more rather than less — it builds trust and keeps the user in the loop.
当有助于建立信任或验证进度时,请主动向用户分享经过身份验证的沙箱URL和截图。用户无法看到沙箱内部的操作 — 展示工作成果的证据非常重要。
分享URL的场景:
  • 创建沙箱或搭建环境后,分享VS Code URL(
    cloudrouter code <id>
    ),方便用户查看工作区
  • 部署或启动服务后,分享VNC URL(
    cloudrouter vnc <id>
    ),方便用户查看运行状态
  • 当Jupyter运行时,分享Jupyter URL,方便用户验证笔记本
  • 任何用户可能需要验证、查看或交互沙箱的场景
分享截图的场景:
  • 完成可视化任务后(例如UI修改、Web应用部署)—— 使用
    cloudrouter computer screenshot <id> out.png
    截取截图并展示
  • 当出现异常或意外情况时 — 截取截图供用户确认
  • 完成浏览器自动化步骤并产生可见结果后(例如表单提交、页面导航、登录流程)
  • 用户要求检查或验证某些内容时
通用规则: 如果您认为用户会从查看工作成果中受益,请分享URL或截图。尽量多展示而非少展示 — 这能建立信任并让用户了解进度。

Security: Dev Server URLs

安全提示:开发服务器URL

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:
    cloudrouter vnc <id>
  • VNC is protected by token authentication (
    ?tkn=
    ) and is the only safe way to view dev server output
  • DO share authenticated URLs: VS Code (
    cloudrouter code <id>
    ), VNC (
    cloudrouter vnc <id>
    ), and Jupyter URLs — these have proper token auth and are safe to surface
When a dev server is started:
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)
NEVER do this:
Frontend: https://5173-xxx.e2b.app   <- WRONG: publicly accessible, no auth
重要:切勿分享或输出原始E2B端口转发URL。
当开发服务器在沙箱中运行时(例如Vite在5173端口、Next.js在3000端口),E2B会创建公共可访问的URL,如
https://5173-xxx.e2b.app
。这些URL无身份验证保护 — 任何拥有链接的人都可以访问运行中的应用。
规则:
  • 切勿输出
    https://5173-xxx.e2b.app
    https://3000-xxx.e2b.app
    或任何
    https://<port>-xxx.e2b.app
    格式的URL
  • 切勿从沙箱元数据中构造或猜测E2B端口URL
  • 务必告知用户通过VNC查看开发服务器:
    cloudrouter vnc <id>
  • VNC受令牌身份验证保护(
    ?tkn=
    ),是查看开发服务器输出的唯一安全方式
  • 可以分享经过身份验证的URL:VS Code(
    cloudrouter code <id>
    )、VNC(
    cloudrouter vnc <id>
    )和Jupyter URL — 这些URL有完善的令牌验证,分享是安全的
启动开发服务器后的提示:
开发服务器在5173端口运行
  请在沙箱的VNC桌面中查看:cloudrouter vnc <id>
  (VNC内的浏览器可访问http://localhost:5173)
绝对禁止的做法:
前端地址:https://5173-xxx.e2b.app   <- 错误:公共可访问,无身份验证

Global Flags

全局参数

-t, --team <team>   Team slug (overrides default)
-v, --verbose       Verbose output
    --json          Machine-readable JSON output
-t, --team <team>   团队标识(覆盖默认值)
-v, --verbose       详细输出
    --json          机器可读的JSON格式输出