Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 144 additions & 92 deletions docs/.vitepress/config.mjs

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions docs/.vitepress/theme/home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Keep the Chinese home-page tagline on one line when the viewport has room.
Narrow screens retain VitePress's responsive wrapping behavior. */
@media (min-width: 768px) {
.VPHomeHero .text {
Comment thread
luzhixing12345 marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this .text rule is unscoped and applies the nowrap to the hero title in both locales, even though the comment above says the intent is the Chinese tagline (only the .tagline rule below is scoped with html[lang^='zh']). Combined with min-width: 768px, a longer title or tagline could overflow without wrapping on tablet-width screens. Consider scoping this rule to html[lang^='zh'] too, or keeping the default wrapping above a generous max-width.

max-width: none;
white-space: nowrap;
}

html[lang^='zh'] .VPHomeHero .tagline {
max-width: none;
white-space: nowrap;
}
}
1 change: 1 addition & 0 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import DefaultTheme from 'vitepress/theme'
import Layout from './Layout.vue'
import BlogIndex from './BlogIndex.vue'
import './blog.css'
import './home.css'

export default {
extends: DefaultTheme,
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/integrations/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ lang: en-US

# Claude Code

[中文文档](../../zh/guide/integrations/claude-code.md)

[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is a terminal-based AI coding agent developed by Anthropic. It runs commands, edits files, and executes code in your terminal.

This guide shows how to keep Claude Code running **on your host** while transparently redirecting **every Bash command it runs** into an isolated CubeSandbox MicroVM, using a `PreToolUse` hook. The model never sees the sandbox layer, and no prompt or workflow changes are required.
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/integrations/langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ lang: en-US

# LangChain Integration Guide

[中文](../../zh/guide/integrations/langchain.md)

Run a LangChain agent that calls a Python tool inside a
[CubeSandbox](https://github.com/TencentCloud/CubeSandbox) MicroVM. Because Cube exposes an
**E2B-compatible API**, migrating a LangChain app from E2B to Cube usually means changing a few
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/integrations/pi-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ lang: en-US

# Pi Agent Integration Guide

[中文文档](../../zh/guide/integrations/pi-agent.md)

Run the [Pi coding agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
— a terminal-native AI coding agent — inside CubeSandbox MicroVMs. This guide
covers image build, key injection, egress control, and snapshot-based session
Expand Down
5 changes: 3 additions & 2 deletions docs/guide/performance-benchmark.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Performance Benchmark

For the detailed performance benchmark report, please refer to the blog post:
Detailed benchmark reports:

[CubeSandbox Core Operations Performance Benchmark](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md)
- [CubeSandbox Core Operations Performance Benchmark](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md)
- [CubeSandbox Core Operations Performance Benchmark on a PVM Cloud Server](../blog/posts/2026-06-03-cubesandbox-perf-benchmark-pvm.md)
2 changes: 1 addition & 1 deletion docs/guide/self-build-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The default expected filename is `vmlinux`. You can override the path via the `O
From the repository root:

```bash
cd cube-sandbox
cd CubeSandbox
./deploy/one-click/build-release-bundle-builder.sh
```

Expand Down
14 changes: 0 additions & 14 deletions docs/guide/tutorials/bring-your-own-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ If you want the whole story about how OCI images become templates, read
tutorial is the prerequisite that gets your image **ready for the readiness
probe** that tutorial requires.

---

## 1. Why does my image need `envd`?

Cube-Sandbox talks to every running sandbox through an in-container daemon
Expand All @@ -28,8 +26,6 @@ In other words: **any image you want to use as a Cube template must have
that is to build `FROM` the official `cubesandbox-base` image — the next
section walks through the full happy path.

---

## 2. Quick start: build on top of `cubesandbox-base`

`cubesandbox-base` is a plain `ubuntu:22.04` with `envd` preinstalled at
Expand Down Expand Up @@ -96,8 +92,6 @@ Cube SDK or `cubemastercli`; the full SDK usage is covered in

Pin the exact envd version (`2026.16`) for reproducible builds.

---

## 3. Alternative: inject `envd` into an existing image

When you want to bring your own custom image, copy `envd` and the
Expand Down Expand Up @@ -142,8 +136,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", "

Build, push and template creation are identical to sections 2.2 / 2.3.

---

## 4. The entrypoint contract

`cube-entrypoint.sh` implements a simple "envd-in-the-background, your
Expand Down Expand Up @@ -189,8 +181,6 @@ control to your main process:
exec "$@"
```

---

## 5. Verifying the image locally (optional)

Before creating a template you can run the same smoke test that CI runs
Expand All @@ -217,8 +207,6 @@ If `/health` does not reach `204` within a few seconds, inspect
docker exec "$cid" cat /var/log/envd.log
```

---

## 6. Troubleshooting

| Symptom | Likely cause | Fix |
Expand All @@ -231,8 +219,6 @@ docker exec "$cid" cat /var/log/envd.log
| `sudo: command not found` in your CMD | You started `FROM` a `-slim` / `-alpine` image without sudo | Either `apt-get install -y sudo`, or drop `sudo` from your entrypoint — `cube-entrypoint.sh` doesn't require it. |
| Template creation times out in `PULLING` | Registry unreachable from Cube nodes | Push to a registry the cluster can reach, or supply `--registry-username` / `--registry-password`. |

---

## 7. Advanced — rebuild the base image yourself

The base image is produced by a single GitHub Actions workflow in this
Expand Down
2 changes: 0 additions & 2 deletions docs/zh/guide/integrations/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ lang: zh-CN

# Claude Code

[English](../../../guide/integrations/claude-code.md)

[Claude Code](https://docs.anthropic.com/en/docs/claude-code) 是 Anthropic 出品的、基于终端的 AI 编码 agent,它在终端里执行命令、编辑文件、运行代码。

本指南介绍如何让 Claude Code 继续跑在**你的宿主机**上,同时用一个 `PreToolUse` hook 把它执行的**每一条 Bash 命令**透明转发进隔离的 CubeSandbox MicroVM。模型完全感知不到沙箱层,也无需改动 prompt 或使用方式。
Expand Down
2 changes: 0 additions & 2 deletions docs/zh/guide/integrations/langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ lang: zh-CN

# LangChain 集成指南

[English](../../guide/integrations/langchain.md)

将调用 Python 工具的 [LangChain](https://github.com/langchain-ai/langchain) Agent 运行在
[CubeSandbox](https://github.com/TencentCloud/CubeSandbox) 的 MicroVM 中。由于 Cube 暴露了
**与 E2B 兼容的 API**,把 LangChain 应用从 E2B 迁移到 Cube 通常只需改几个环境变量,同时还能为
Expand Down
2 changes: 0 additions & 2 deletions docs/zh/guide/integrations/pi-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ lang: zh-CN

# Pi Agent 集成指南

[English](../../../guide/integrations/pi-agent.md)

在 CubeSandbox MicroVM 内运行 [Pi coding agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
(面向终端的 AI 编码 Agent)。本文覆盖镜像构建、密钥注入、出网管控,以及基于快照的会话持久化,配套的可运行示例位于
[`examples/pi-agent-integration`](https://github.com/TencentCloud/CubeSandbox/tree/master/examples/pi-agent-integration)。
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Go:`cubesandbox.NeverTimeout`;Python:`from cubesandbox import NEVER_TIMEOU
create() ┌────▼────┐ timeout & on_timeout=pause ┌─────────┐
───────────────►│ running │ ──────────────────────────────►│ paused │
│ │◄──────── connect() 或 │ │
└─┬─────┬─┘ auto_resume 触发的请求 └────┬────┘
└─┬─────┬─┘ auto_resume 触发的请求 └────┬────┘
│ │ │
kill() │ │ timeout & on_timeout=kill │ kill()
────────────┘ └─────────────────┐ │
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/multi-node-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ sudo ./down.sh
| `CUBE_SANDBOX_NETWORK_CIDR_SKIP_CONFLICT_CHECK` | `0` | 设为 `1` 跳过冲突检测(不推荐)。 |
| `ONE_CLICK_RUN_QUICKCHECK` | `1` | 安装后是否执行健康检查 |

完整配置参考(构建选项、数据库、代理等)请参阅[本地构建部署 — 配置参考](./self-build-deploy.md#配置参考
完整配置参考(构建选项、数据库、代理等)请参阅[本地构建部署 — 配置参考](./self-build-deploy.md#配置参考)

## 故障排查

Expand Down
5 changes: 3 additions & 2 deletions docs/zh/guide/performance-benchmark.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 性能测试

详细的性能基准测试报告请参见博客
详细的性能基准测试报告

[CubeSandbox 核心操作性能基准测试报告](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md)
- [CubeSandbox 核心操作性能基准测试报告](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md)
- [CubeSandbox PVM 云服务器核心操作性能基准测试报告](../blog/posts/2026-06-03-cubesandbox-perf-benchmark-pvm.md)
2 changes: 1 addition & 1 deletion docs/zh/guide/self-build-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cp /path/to/vmlinux deploy/one-click/assets/kernel-artifacts/
在仓库根目录执行:

```bash
cd cube-sandbox
cd CubeSandbox
./deploy/one-click/build-release-bundle-builder.sh
```

Expand Down
14 changes: 0 additions & 14 deletions docs/zh/guide/tutorials/bring-your-own-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
[从 OCI 镜像制作模板](./template-from-image.md)。本教程是那篇文档的
**前置步骤**:保证你的镜像满足它所要求的探活 (readiness probe) 条件。

---

## 1. 为什么我的镜像需要 `envd`?
Comment thread
luzhixing12345 marked this conversation as resolved.

Cube-Sandbox 与沙箱容器之间的所有通信都是通过容器内的 `envd` 守护进程
Expand All @@ -26,8 +24,6 @@ Cube-Sandbox 与沙箱容器之间的所有通信都是通过容器内的 `envd`
`:49983` 上监听**。最简单的方式就是直接基于官方 `cubesandbox-base`
构建——下一节就是完整流程。

---

## 2. 快速开始:基于 `cubesandbox-base`

`cubesandbox-base` 是一个普通的 `ubuntu:22.04`,在 `/usr/bin/envd` 预装
Expand Down Expand Up @@ -91,8 +87,6 @@ cubemastercli tpl create-from-image \

为了保证可复现构建,**推荐 pin 到精确的 envd 版本 (`2026.16`)**。

---

## 3. 备选:往现有镜像里注入 `envd`

如果你想使用你自定义的镜像,可以用 `COPY --from=` 从 `cubesandbox-base`
Expand Down Expand Up @@ -136,8 +130,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", "

构建、推送、创建模板的流程和第 2.2 / 2.3 节一致。

---

## 4. 入口脚本契约

`cube-entrypoint.sh` 实现了一个非常简单的 "envd 后台 + 用户应用前台" 的
Expand Down Expand Up @@ -178,8 +170,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", "
exec "$@"
```

---

## 5. 本地验证镜像(可选)

创建模板前,可以跑一遍 CI 用于验证 base 镜像的同款 smoke test:
Expand All @@ -204,8 +194,6 @@ docker rm -f "$cid"
docker exec "$cid" cat /var/log/envd.log
```

---

## 6. 排错速查

| 现象 | 可能原因 | 解决 |
Expand All @@ -218,8 +206,6 @@ docker exec "$cid" cat /var/log/envd.log
| `sudo: command not found` | 基于 `-slim` / `-alpine` 这种无 sudo 的镜像构建 | `apt-get install -y sudo`,或直接把 `sudo` 从 CMD 里去掉——`cube-entrypoint.sh` 不依赖它 |
| 模板创建长时间卡在 `PULLING` | registry 从 Cube 节点不可达 | 推送到集群可访问的 registry,或用 `--registry-username` / `--registry-password` |

---

## 7. 进阶 —— 自己重建基础镜像

基础镜像由仓库内单个 GitHub Actions workflow 自动构建:
Expand Down
Loading