cloudrouter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecloudrouter - 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 or without a specific task, present the available modes:
/cloudrouter/crcloudrouter - 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/crcloudrouter - 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/cloudrouterThis installs both and (shorthand) as CLI commands.
cloudroutercrThen authenticate:
bash
cloudrouter loginIf the user hasn't logged in yet, prompt them to run first before using any other commands.
cloudrouter login如果未安装cloudrouter,帮助用户完成安装:
bash
npm install -g @manaflow-ai/cloudrouter此命令会将和简写形式作为CLI命令全局安装。
cloudroutercr然后进行身份验证:
bash
cloudrouter login如果用户尚未登录,提示他们先运行,再使用其他命令。
cloudrouter loginQuick 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 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>
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 .将本地目录同步到云沙箱。这是比从Git仓库克隆更推荐的工作流。cloudrouter start <local-path>
Commands
命令说明
Authentication
身份验证
bash
cloudrouter login # Login (opens browser)
cloudrouter logout # Logout and clear credentials
cloudrouter whoami # Show current user and teambash
cloudrouter login # 登录(打开浏览器)
cloudrouter logout # 登出并清除凭证
cloudrouter whoami # 显示当前用户和团队信息Creating Sandboxes
创建沙箱
bash
undefinedbash
undefinedStandard 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
undefinedcloudrouter start -p e2b . # 使用E2B服务商(默认)
cloudrouter start -p modal . # 使用Modal服务商
undefinedGPU Options
GPU选项
| 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 |
GPUs requiring approval: contact founders@manaflow.com.
Multi-GPU: append to the GPU type, e.g. for 2x H100.
:N--gpu H100:2| GPU | 显存 | 最佳适用场景 | 可用权限 |
|---|---|---|---|
| T4 | 16GB | 推理、小模型微调 | 自助使用 |
| L4 | 24GB | 推理、图像生成 | 自助使用 |
| A10G | 24GB | 中等模型训练 | 自助使用 |
| L40S | 48GB | 推理、视频生成 | 需要审批 |
| A100 | 40GB | 大模型训练(7B-70B参数) | 需要审批 |
| A100-80GB | 80GB | 超大规模模型 | 需要审批 |
| H100 | 80GB | 快速训练、科研 | 需要审批 |
| H200 | 141GB | 最大内存容量需求 | 需要审批 |
| B200 | 192GB | 最新一代前沿模型 | 需要审批 |
需要审批的GPU:联系founders@manaflow.com申请。
多GPU配置:在GPU类型后追加,例如表示2块H100。
:N--gpu H100:2All start
Flags
start所有start
命令参数
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 insteadWarning: Do NOT pass template names (e.g.) to thecmux-devbox-baseflag. These are display names, not valid E2B template IDs. Use-Tfor Docker support and--dockerfor GPU support instead.--gpu <type>
-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参数。这些是显示名称,并非有效的E2B模板ID。如需Docker支持请使用-T,如需GPU支持请使用--docker。--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 templatesbash
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 sessionbash
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 commandImportant: Preferfor interactive work. Usecloudrouter ptyonly for quick one-off commands.cloudrouter exec
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:
- — accepts 1-2 positional args: sandbox ID and optional local path
cloudrouter upload <id> [local-path] - — accepts 1-2 positional args: sandbox ID and optional local path
cloudrouter download <id> [local-path] - Use flag to specify a non-default remote directory (default:
-r <remote-path>)/home/user/workspace - Do NOT pass remote paths as positional arguments — this will error. Always use the flag.
-r
bash
undefined在本地机器和沙箱之间上传、下载文件或目录。
命令格式:
- — 接受1-2个位置参数:沙箱ID和可选的本地路径
cloudrouter upload <id> [local-path] - — 接受1-2个位置参数:沙箱ID和可选的本地路径
cloudrouter download <id> [local-path] - 使用参数指定非默认远程目录(默认:
-r <remote-path>)/home/user/workspace - 请勿将远程路径作为位置参数传递 — 这会导致错误。请始终使用参数。
-r
bash
undefinedUpload (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 acommand fails right aftercomputer, wait a few seconds and retry. This is rare but expected — Chrome needs a moment to boot inside the sandbox.cloudrouter start
通过沙箱VNC桌面中的CDP控制Chrome浏览器。
启动延迟: 沙箱创建后,Chrome CDP可能无法立即就绪。如果命令在computer后立即执行失败,请等待几秒后重试。这种情况很少见,但属于正常现象 — Chrome需要在沙箱中完成启动。cloudrouter start
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 titlebash
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 filebash
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 appearbash
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,.classbutton[type="submit"]
两种元素选择方式:
- 快照中的元素引用:、
@e1、@e2...@e3 - CSS选择器:、
#id、.classbutton[type="submit"]
Sandbox IDs
沙箱ID
Sandbox IDs look like . Use the full ID when running commands. Get IDs from or output.
cr_abc12345cloudrouter lscloudrouter start沙箱ID格式为。执行命令时请使用完整ID。可通过或的输出获取ID。
cr_abc12345cloudrouter lscloudrouter startCommon 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 terminalbash
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
undefinedcloudrouter download cr_abc123 ./checkpoints # 下载训练好的模型
undefinedDocker workflow
Docker工作流
bash
cloudrouter start --docker ./my-app # Sandbox with Docker
cloudrouter pty cr_abc123 # Open terminalbash
cloudrouter start --docker ./my-app # 创建带Docker的沙箱
cloudrouter pty cr_abc123 # 打开终端Inside: docker compose up -d
终端内执行:docker compose up -d
undefinedundefinedFile transfer workflow
文件传输工作流
bash
cloudrouter upload cr_abc123 ./my-project # Push local files to sandboxbash
cloudrouter upload cr_abc123 ./my-project # 将本地文件推送到沙箱... do work in sandbox ...
... 在沙箱中完成工作 ...
cloudrouter download cr_abc123 ./output # Pull files from sandbox to local
undefinedcloudrouter download cr_abc123 ./output # 将沙箱文件拉取到本地
undefinedBrowser automation: Login to a website
浏览器自动化:登录网站
bash
cloudrouter computer open cr_abc123 "https://example.com/login"
cloudrouter computer snapshot cr_abc123bash
cloudrouter computer open cr_abc123 "https://example.com/login"
cloudrouter computer snapshot cr_abc123Output: @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
undefinedcloudrouter 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
undefinedBrowser 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 capturebash
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:
-
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, leave them alone — they may belong to the user or another workflow.
cloudrouter ls -
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 withso the user has time to check it out. Share the relevant URL (VS Code, VNC, etc.) so they can access it.
cloudrouter extend <id>- Use to set a custom duration (default is 3600 = 1 hour). Do NOT use
--seconds <N>— that flag does not exist.--timeout - Example: extends by 30 minutes.
cloudrouter extend cr_abc123 --seconds 1800
- Use
-
Stop, don't delete, by default. Preferover
cloudrouter stop <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.cloudrouter delete <id> -
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.
-
Monitor concurrency. Before creating a new sandbox, runto 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.
cloudrouter ls -
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也会显示此提示信息)。
清理规则 — 请谨慎操作:
-
仅操作本次会话创建的沙箱。 请勿停止或删除非本人创建或不熟悉的沙箱。如果在中看到未知沙箱,请忽略 — 它们可能属于用户或其他工作流。
cloudrouter ls -
清理前先延长超时。 在停止或删除本人创建的沙箱前,请考虑用户是否需要查看其中内容。如果您创建的沙箱中有用户需要查看的内容(例如运行中的应用、训练好的模型、浏览器自动化结果等),请使用延长沙箱超时时间,以便用户有时间查看。同时分享相关URL(VS Code、VNC等)供用户访问。
cloudrouter extend <id>- 使用设置自定义时长(默认3600秒=1小时)。请勿使用
--seconds <N>参数 — 该参数不存在。--timeout - 示例:表示延长30分钟。
cloudrouter extend cr_abc123 --seconds 1800
- 使用
-
默认选择停止,而非删除。 优先使用而非
cloudrouter stop <id>,除非沙箱明显是一次性的(例如快速测试且未产生任何成果)。已停止的沙箱可重启;已删除的沙箱则永久消失。cloudrouter delete <id> -
完成任务后清理。 当任务完成且用户不再需要沙箱时,请停止它。请勿让沙箱一直运行 — 它们会占用并发限制额度。
-
监控并发数。 创建新沙箱前,运行查看当前运行中的沙箱数量。如果已有8个及以上活跃沙箱,请提醒用户并询问是否可以停止部分沙箱后再创建新的。请勿静默触发限制。
cloudrouter ls -
达到限制时的处理: 告知用户已达到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
undefinedcloudrouter stop cr_abc123 # 完成后停止沙箱(可后续重启)
cloudrouter delete cr_abc123 # 仅在沙箱为一次性时删除
undefinedSurfacing 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 () so the user can inspect the workspace
cloudrouter code <id> - After deploying or starting a service, share the VNC URL () so the user can see it running
cloudrouter vnc <id> - 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 and show it
cloudrouter computer screenshot <id> out.png - 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 . These URLs have NO authentication — anyone with the link can access the running application.
https://5173-xxx.e2b.appRules:
- NEVER output URLs like ,
https://5173-xxx.e2b.app, or anyhttps://3000-xxx.e2b.appURLhttps://<port>-xxx.e2b.app - 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 () and is the only safe way to view dev server output
?tkn= - DO share authenticated URLs: VS Code (), VNC (
cloudrouter code <id>), and Jupyter URLs — these have proper token auth and are safe to surfacecloudrouter vnc <id>
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,如。这些URL无身份验证保护 — 任何拥有链接的人都可以访问运行中的应用。
https://5173-xxx.e2b.app规则:
- 切勿输出、
https://5173-xxx.e2b.app或任何https://3000-xxx.e2b.app格式的URLhttps://<port>-xxx.e2b.app - 切勿从沙箱元数据中构造或猜测E2B端口URL
- 务必告知用户通过VNC查看开发服务器:
cloudrouter vnc <id> - VNC受令牌身份验证保护(),是查看开发服务器输出的唯一安全方式
?tkn= - 可以分享经过身份验证的URL:VS Code()、VNC(
cloudrouter code <id>)和Jupyter URL — 这些URL有完善的令牌验证,分享是安全的cloudrouter vnc <id>
启动开发服务器后的提示:
开发服务器在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格式输出