ultraworkers/claw-code · Usage · Rust workspace · Parity · Roadmap · UltraWorkers Discord · 中文
Claw Code is the public Rust implementation of the claw CLI agent harness.
The canonical implementation lives in rust/, and the current source of truth for this repository is ultraworkers/claw-code.
IMPORTANT
Start with USAGE.md for build, auth, CLI, session, and parity-harness workflows. Make claw doctor your first health check after building, use rust/README.md for crate-level details, read PARITY.md for the current Rust-port checkpoint, and see docs/container.md for the container-first workflow.
rust/ — canonical Rust workspace and the claw CLI binarynpm/ — npm package for cross-platform binary installation via npm install clawUSAGE.md — task-oriented usage guide for the current product surfacePARITY.md — Rust-port parity status and migration notesROADMAP.md — active roadmap and cleanup backlogPHILOSOPHY.md — project intent and system-design framingscripts/ — cross-build and release automation scriptsskills/ — Claude Code skills for build/release workflowssrc/ + tests/ — companion Python/reference workspace and audit helpers; not the primary runtime surfaceNOTE
[!WARNING]
cargo install claw-code installs the wrong thing. The claw-code crate on crates.io is a deprecated stub that places claw-code-deprecated.exe — not claw. Running it only prints "claw-code has been renamed to agent-code". Do not use cargo install claw-code. Either build from source (this repo) or install the upstream binary:
cargo install agent-code # upstream binary — installs 'agent.exe' (Windows) / 'agent' (Unix), NOT 'agent-code'
This repo (ultraworkers/claw-code) is build-from-source only — follow the steps below.
# 1. Clone and build
git clone https://github.com/ultraworkers/claw-code
cd claw-code/rust
cargo build --workspace
# 2. Set your API key (Anthropic API key — not a Claude subscription)
export ANTHROPIC_API_KEY="sk-ant-..."
# 3. Verify everything is wired correctly
./target/debug/claw doctor
# 4. Run a prompt
./target/debug/claw prompt "say hello"
NOTE
Windows (PowerShell): the binary is claw.exe, not claw. Use .\target\debug\claw.exe or run cargo run -- prompt "say hello" to skip the path lookup.
PowerShell is a supported Windows path. Use whichever shell works for you. The common onboarding issues on Windows are:
If this fails, reopen your terminal or run the PATH setup from the Rust installer output, then retry.cargo --version
git clone https://github.com/ultraworkers/claw-code cd claw-code/rust cargo build --workspace
.exe and backslash):
$env:ANTHROPIC_API_KEY = "sk-ant-..." .\target\debug\claw.exe prompt "say hello"
Git Bash / WSL are optional alternatives, not requirements. If you prefer bash-style paths (/c/Users/you/... instead of C:\Users\you\...), Git Bash (ships with Git for Windows) works well. In Git Bash, the MINGW64 prompt is expected and normal — not a broken install.
NOTE
Auth: claw requires an API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) — Claude subscription login is not a supported auth path.
Run the workspace test suite:
cd rust
cargo test --workspace
通过 npm 一键安装预编译二进制(支持 Linux x86_64 / ARM64、Windows x86_64):
# 使用 --registry 指定 CNB 源(公开,无需 token)
npm install -g claw --registry=https://npm.cnb.cool/ccdecode/claw/-/packages/
# 验证
claw doctor
也可以在项目内本地安装或使用 npx 一次性运行,详见 USAGE.md。
npm 包源码位于 npm/ 目录,包含 postinstall 脚本用于自动下载和校验平台对应的二进制文件。
Pre-built binaries are available from CNB Releases.
| Platform | File | Arch |
|---|---|---|
| Linux | claw-linux-amd64 | x86_64 |
| Linux (ARM) | claw-linux-arm64 | aarch64 |
| Windows | claw-windows-amd64.exe | x86_64 |
# Download and verify (Linux x86_64 example)
curl -LO https://cnb.cool/ccdecode/claw-code/-/releases/download/v2026.4.10/claw-linux-amd64
curl -LO https://cnb.cool/ccdecode/claw-code/-/releases/download/v2026.4.10/checksums-sha256.txt
sha256sum -c checksums-sha256.txt --ignore-missing
chmod +x claw-linux-amd64
./claw-linux-amd64 doctor
Use scripts/cross-build-release.sh to build all platforms and publish a release to CNB:
CNB_TOKEN="your-token" ./scripts/cross-build-release.sh v2026.4.10
The script handles: toolchain setup, parallel cross-compilation, git tagging, release creation, and asset upload via CNB OpenAPI.
USAGE.md — quick commands, auth, sessions, config, parity harnessrust/README.md — crate map, CLI surface, features, workspace layoutPARITY.md — parity status for the Rust portrust/MOCK_PARITY_HARNESS.md — deterministic mock-service harness detailsROADMAP.md — active roadmap and open cleanup workPHILOSOPHY.md — why the project exists and how it is operated/exit to leave.Claw Code is built in the open alongside the broader UltraWorkers toolchain: