用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/circlesac/sandbox --skill sandbox命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | sandbox |
| description | Guide for using the E2B-compatible local sandbox with Docker or Shuru microVMs |
E2B-compatible sandbox that runs locally using Docker or Shuru microVMs. Use the standard E2B SDK — when ready for production, switch to real E2B by changing one config value.
# Install
npm install -g @circlesac/sandbox
# Start (auto-generates API key on first run)
sandbox serve # starts the control plane on :49982
E2B SDK → Control Plane (Hono on :49982) → Backend → Sandboxes (envd)
Backends:
The control plane proxies E2B SDK requests to sandbox instances running envd. Three routing layers:
{port}-{sandboxId}.{domain} for domain-based routingimport { Sandbox } from "e2b";
const sandbox = await Sandbox.create("base", {
apiUrl: "http://localhost:49982",
apiKey: "your-api-key", // from ~/.sandbox/config.json
sandboxUrl: "http://localhost:49982",
});
// Run commands
const result = await sandbox.commands.run("echo hello");
console.log(result.stdout); // "hello\n"
// File operations
await sandbox.files.write("/tmp/test.txt", "content");
const content = await sandbox.files.read("/tmp/test.txt");
// List directory
const entries = await sandbox.files.list("/tmp");
// Cleanup
await sandbox.kill();
| Command | Description |
|---|---|
sandbox serve | Start the control plane server (auto-generates API key on first run) |
sandbox status | Show health, backend, and running sandbox count |
Edit ~/.sandbox/config.json to set the backend:
{
"apiKey": "sk-sandbox-...",
"backend": "shuru"
}
Omit backend or set to "docker" for Docker (default).
| Method | Path | Description |
|---|---|---|
| POST | /sandboxes | Create a sandbox |
| GET | /sandboxes | List sandboxes |
| GET | /sandboxes/:id | Get sandbox info |
| DELETE | /sandboxes/:id | Kill a sandbox |
| POST | /sandboxes/:id/timeout | Update timeout |
| POST | /sandboxes/:id/pause | Pause a sandbox (Docker only) |
| POST | /sandboxes/:id/resume | Resume a paused sandbox (Docker only) |
| GET | /health | Health check (no auth) |
All endpoints except /health require X-API-Key header.
Templates map to Docker images. Resolution order:
sandbox-{templateId}:latest (e.g., sandbox-base:latest)ghcr.io/circlesac/sandbox-{templateId}:latestBuild the base image: docker build -t sandbox-base:latest docker/sandbox
Templates map to shuru checkpoints named sandbox-{templateId} (e.g., sandbox-base).
Create a checkpoint:
shuru checkpoint create sandbox-base --allow-net -- sh -c \
'apk add --no-cache bash sudo curl wget && ...'
If no sandbox-base checkpoint exists, shuru runs a plain Alpine VM.