What it is
Claw Code is the public Rust implementation of the claw CLI agent harness, with the canonical implementation in the rust/ workspace. The README says it is not the serious production project and is closer to a museum exhibit, an agent-managed artifact maintained by the LazyCodex and Gajae-Code harnesses. It is build-from-source only, and the crates.io claw-code crate is a deprecated stub that should not be installed.
Who it's for
- Developers who want to inspect the Claw Code artifact and its Rust implementation of the
clawCLI - Users willing to build a Rust CLI agent harness from source and authenticate with an API key
- Readers following the Rust-port parity status and roadmap
Requirements
Requirements
- Rust toolchain with cargo (Windows users install from https://rustup.rs/)
- An API key such as ANTHROPIC_API_KEY or OPENAI_API_KEY; Claude subscription login is not a supported auth path
- Building from source via
cargo build --workspace(the README says a release build takes 5–10 minutes)
Setup
Clone, build, authenticate and run
Build the workspace from source, set your Anthropic API key, verify with
claw doctor, then run a prompt or start an interactive session. Do not usecargo install claw-code; it installs a deprecated stub.bash# 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" # 5. Start an interactive session ./target/debug/clawWindows (PowerShell) build and run
On Windows the binary is
claw.exe. After installing Rust and confirming cargo is on PATH, clone and build, then run with the .exe path.powershell$env:ANTHROPIC_API_KEY = "sk-ant-..." .\target\debug\claw.exe prompt "say hello"Optional: install to Cargo's bin directory
To run
clawfrom any directory, install from therust/directory into Cargo's default location (~/.cargo/bin/).bash# From the claw-code/rust/ directory cargo install --path . --force # Then from anywhere claw --help
Examples
Verify the build
bash./rust/target/debug/claw --help
./rust/target/debug/claw doctorWhat it does: Run from the repo root on macOS/Linux. claw doctor is the first health check and validates your API key, model access, and tool configuration.
Run a one-shot prompt
bash./target/debug/claw prompt "say hello"What it does: Sends a single prompt through the debug-built binary from the rust/ directory.
Credential-free PowerShell smoke test
powershell$env:CLAW_CONFIG_HOME = Join-Path $env:TEMP "claw config home"
New-Item -ItemType Directory -Force -Path $env:CLAW_CONFIG_HOME | Out-Null
Remove-Item Env:\ANTHROPIC_API_KEY, Env:\ANTHROPIC_AUTH_TOKEN, Env:\OPENAI_API_KEY -ErrorAction SilentlyContinue
.\rust\target\debug\claw.exe help
.\rust\target\debug\claw.exe status
.\rust\target\debug\claw.exe config env
.\rust\target\debug\claw.exe doctorWhat it does: Checks that the build works without live credentials by using a temporary config home and clearing API key variables.
Run the workspace test suite
bashcd rust
cargo test --workspaceWhat it does: Recommended after verifying the binary works.
Pros & cons
Pros
- Pro:Detailed cross-platform build and verification guidance, including a PowerShell-first Windows path
- Pro:
claw doctorprovides a built-in health check for API key, model access, and tool configuration - Pro:MIT-licensed, with documentation for usage, parity status, roadmap, and local OpenAI-compatible providers
Cons
- Con:The README states it is not the serious production project and points users to LazyCodex or Gajae-Code for real work
- Con:Build-from-source only;
cargo install claw-codeinstalls a deprecated stub that does not provideclaw - Con:Requires an API key; Claude subscription login is unsupported, and no ACP/Zed daemon or JSON-RPC entrypoint ships yet