Coop – 用于运行 Claude Code 和 Codex 的隔离式虚拟机环境
Coop – Isolated VM Environments for Running Claude Code and Codex

原始链接: https://github.com/trailofbits/coop

**coop** 是一个基于 Rust 的命令行工具,旨在为 Claude Code 和 Codex 等 AI 智能体提供隔离的、一次性的虚拟机环境。通过在沙盒虚拟机中运行这些智能体,用户可以授予它们对 Docker、编译器和包管理器等工具的完全访问权限,而无需担心宿主机的安全或稳定性。 每个环境都是可复现的,且创建与销毁的成本低廉。**coop** 目前针对 macOS (Apple Silicon) 和 Linux (x86_64) 进行了优化,并利用了 Firecracker 和 Lima 等虚拟化后端。 **入门指南:** 1. **安装:** 使用提供的安装脚本,或通过 Cargo 从源码构建。 2. **设置:** 运行 `coop setup` 以准备环境(在 macOS 上需确保已满足 Lima 等先决条件)。 3. **使用:** 进入项目目录,运行 `coop up` 初始化虚拟机,然后使用 `coop claude` 或 `coop codex` 启动你偏好的智能体。 **coop** 提供了一个安全、临时的工作区,非常适合智能体驱动的开发工作流,确保你的本地系统在 AI 助手工作时不受影响。

Trail of Bits 发布了 **Coop**,这是一个开源工具,旨在为 Claude Code 和 Codex 等 AI 智能体提供隔离的虚拟机环境。该项目旨在提供一种安全的沙盒边界,防止 AI 智能体访问敏感的本地文件或不相关的项目,从而解决在部署自主代码编写工具时常见的安全顾虑。 Hacker News 上的讨论凸显了用户对现有沙盒解决方案替代方案的兴趣。虽然一些用户质疑 Coop 与 Docker SBX 或 bubblewrap 等工具有何不同,但支持者指出,它为容器化智能体环境提供了一种便捷且以开源为先的方法。 社区的主要观点包括: * **安全性:** 它为智能体提供了更严格的屏障,尽管用户也承认没有任何沙盒能完全抵御蓄意的攻击。 * **开源:** 用户将其视为 Docker 沙盒等专有解决方案的替代品。 * **命名:** 该项目与欧洲历史悠久的国际零售合作社连锁店同名,这在评论区引发了一些轻松的困惑。 总的来说,Coop 被定位为一种实用工具,适合那些既想赋能 AI 智能体,又希望在本地开发环境中保持稳健边界的开发者。
相关文章

原文

Isolated VM environments for running Claude Code and Codex.

Pronunciation: "coop" (/kuːp/) — one syllable, rhymes with "loop", like the thing you keep chickens in. Not "co-op".

coop is a Rust CLI that manages disposable virtual machines where Claude Code and Codex have full tool access: Docker, git, compilers, package managers, all without risk to your host machine. Each VM is isolated, reproducible, and cheap to create and destroy.

Install the latest release:

curl -fsSL https://raw.githubusercontent.com/trailofbits/coop/main/install.sh | bash

Or build from source (requires Rust):

cargo build --release
cp target/release/coop /usr/local/bin/

Then build the VM template image:

On Linux, coop setup also installs Firecracker and fetches a guest kernel. On macOS, install Lima first (brew install lima) — setup fails without it. coop is tested on macOS arm64 (Apple Silicon) and Linux x86_64; Linux arm64 builds are available but untested. Each backend has its own host requirements — see Prerequisites.

Keep coop updated:

See coop update and the updates config section.

Start an instance for the current project and launch an agent CLI:

cd ~/code/my-project
coop up
coop claude
# or
coop codex
联系我们 contact @ memedata.com