This directory contains the Rust implementation of the claw CLI and its supporting crates.
For the quickest onboarding path, use ../USAGE.md. That guide is the copy/paste setup surface for first-time users.
cd rust
cargo build --workspace
./target/debug/claw doctor
./target/debug/claw prompt "say hello"On Windows PowerShell:
cd .\rust
cargo build --workspace
.\target\debug\claw.exe doctor
.\target\debug\claw.exe prompt "say hello"api- provider clients, request types, streaming, and auth helperscommands- slash-command registry and help renderingcompat-harness- upstream manifest extraction and compatibility surfacesmock-anthropic-service- deterministic local Anthropic-compatible test serviceplugins- plugin metadata and install/enable/disable flowsruntime- session runtime, permissions, config loading, MCP lifecycle, promptsrusty-claude-cli- theclawbinary cratetelemetry- usage and session telemetry typestools- built-in tool definitions and execution layer
cargo run -p rusty-claude-cli -- --help
cargo run -p rusty-claude-cli -- doctor
cargo run -p rusty-claude-cli -- prompt "explain this codebase"
cargo run -p rusty-claude-cli -- --output-format json prompt "summarize src/main.rs"Anthropic direct API:
export ANTHROPIC_API_KEY="YOUR_API_KEY_HERE"Anthropic bearer token:
export ANTHROPIC_AUTH_TOKEN="anthropic-oauth-or-proxy-bearer-token"OpenAI-compatible or OpenRouter:
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
export OPENAI_API_KEY="YOUR_API_KEY_HERE"cd rust
./scripts/run_mock_parity_harness.shManual mock service startup:
cargo run -p mock-anthropic-service -- --bind 127.0.0.1:0This workspace pins Rust in rust-toolchain.toml; install with rustup so local builds and CI use the same compiler.
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace- The live CLI help still mentions upstream
ultraworkers/claw-codein a few places. claw doctoris the best first stop for setup issues.- The packaged Windows binary in the repo root is rebuilt by
../build-claw.ps1.