商业产业 Hacker News Claude 2026-09-07T04:18 正文 ok 187 words

Coop:用于运行 Claude Code 和 Codex 的隔离 VM 环境

英文标题:🔶 Coop – Isolated VM Environments for Running Claude Code and Codex

Coop 是一款 Rust CLI 工具,用于管理可一次性使用的隔离虚拟机,让 Claude Code 和 Codex 能够安全地获得 Docker、git、编译器和包管理器等完整工具访问权限。每个 VM 都是隔离、可复现且可低成本创建和销毁的,从而避免 Agent 操作影响宿主机。该工具支持 macOS arm64(Apple Silicon)和 Linux x86_64,Linux arm64 提供构建版本但尚未经过测试。对开发者而言,Coop 提供了一种在本地项目中快速启动受控 Agent 执行环境的方式。
打开原文相关 3 · 机会 0
media52.7 KB

中文

用于运行 Claude Code 和 Codex 的隔离 VM 环境。

发音:“coop”(/kuːp/)——单音节,与“loop”押韵,和养鸡的鸡舍是同一个词。不是“co-op”。

coop 是一个 Rust CLI,用于管理一次性虚拟机;在这些虚拟机中,Claude Code 和 Codex 可获得完整的工具访问权限,包括 Docker、git、编译器和包管理器,同时不会给宿主机带来风险。每个 VM 都是隔离、可复现的,并且创建和销毁成本低廉。

安装最新版本:

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

或者从源码构建(需要安装 Rust):

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

然后构建 VM 模板镜像:

在 Linux 上,coop setup 还会安装 Firecracker 并获取客户机内核。在 macOS 上,请先安装 Lima(brew install lima)——未安装 Lima 时,setup 会失败。coop 已在 macOS arm64(Apple Silicon)和 Linux x86_64 上经过测试;Linux arm64 提供构建版本,但尚未经过测试。每个后端都有各自的宿主机要求——请参阅前置条件。

保持 coop 为最新版本:

请参阅 coop update 和 updates 配置章节。

为当前项目启动一个实例,并启动 Agent CLI:

cd ~/code/my-project
coop up
coop claude
# 或者
coop codex

English / 原文

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