Claurst contains no original Claude Code TypeScript source. It was built in two strictly separated phases — behavioral specification and independent implementation — mirroring the clean-room engineering precedent established by Phoenix Technologies v. IBM (1984). Copyright protects expression, not behavior. See below for the full legal and engineering rationale.
What is Claurst?
Claurst is a full reimplementation of the Claude Code terminal agent written in async Rust. It runs as an interactive terminal application, streams responses from the Anthropic Claude API, and executes tools on your behalf — reading and writing files, running shell commands, searching the web, spawning sub-agents, and much more. It is built on a foundation of idiomatic Rust crates:- Tokio — async runtime powering every tool, stream, and background task
- ratatui — immediate-mode terminal UI replacing the original React/Ink renderer
- clap — type-safe CLI argument parsing with environment variable support
- reqwest — async HTTP client for Claude API communication and web tools
claude binary that reproduces the behavior and semantics of Claude Code without inheriting any of its source.
Key capabilities
33+ built-in tools
File read/write/edit, Bash, Glob, Grep, WebFetch, WebSearch, NotebookEdit, task management, cron scheduling, git worktrees, and more.
Multi-agent orchestration
Spawn sub-agents via the
Task tool. Coordinator mode directs parallel worker agents across research, synthesis, implementation, and verification phases.MCP integration
Connect any Model Context Protocol server over stdio. Tools are dynamically registered and namespaced per server at runtime.
ratatui TUI
A full interactive terminal UI with streaming output, input history, permission dialogs, a status bar, and a braille spinner — no browser required.
Quickstart
Build and run Claurst in under five minutes.
Architecture
Understand the crate structure and how the agentic loop works.
Commands reference
All 34 slash commands:
/help, /compact, /model, /mcp, /plan, and more.Tools reference
Full reference for every tool Claude can invoke on your behalf.
The clean-room engineering process
Building Claurst required two strictly isolated phases, modeled on the legal and engineering principle established in Phoenix Technologies v. IBM (1984) and grounded in the doctrine from Baker v. Selden (1879) that copyright protects expression — not ideas or behavior.Phase 1 — Specification
A first AI agent analyzed the publicly available Claude Code behavior and produced exhaustive behavioral specifications: architecture diagrams, data flows, tool contracts, permission models, and system designs. This team had access to the original source only to observe and document behavior. No source code was carried forward. The output lives inspec/ — 13 markdown documents covering every subsystem in detail.
Phase 2 — Implementation
A separate AI agent read only the specification files — never the original TypeScript — and produced idiomatic Rust that reproduces the documented behavior. The output lives insrc-rust/.
This mirrors the exact structure used by Phoenix Technologies when creating a clean-room IBM BIOS: two teams, information flows in one direction only, the second team never sees the original source.
Crate structure
Claurst is organized as a Cargo workspace with ten crates:| Crate | Package | Role |
|---|---|---|
crates/core | cc-core | Shared types, config, permissions, history, hooks |
crates/api | cc-api | Anthropic Messages API client with SSE streaming |
crates/tools | cc-tools | All 33 built-in tool implementations |
crates/query | cc-query | Agentic query loop, auto-compact, cron scheduler |
crates/tui | cc-tui | ratatui terminal UI |
crates/commands | cc-commands | Slash command implementations |
crates/mcp | cc-mcp | Model Context Protocol client |
crates/bridge | cc-bridge | Bridge to claude.ai web UI |
crates/buddy | cc-buddy | Companion pet system (BUDDY feature flag) |
crates/cli | claude-code | Binary entry point — produces the claude executable |
Feature-gated systems
Several advanced systems from the original Claude Code are preserved in Claurst behind compile-time feature flags, including:BUDDY— Tamagotchi-style companion pet with deterministic gacha species, procedurally generated stats, and a Claude-authored personalityPROACTIVE/KAIROS— Always-on persistent assistant that watches, logs, and proactively acts on observationsCOORDINATOR_MODE— Multi-agent orchestration where Claude directs parallel worker agents