> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yocxy2/claurst/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Claurst is a clean-room Rust reimplementation of Claude Code — a terminal AI coding agent with 33+ tools, multi-agent orchestration, MCP integration, and a ratatui TUI.

<Note>
  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.
</Note>

## 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

The result is a single `claude` binary that reproduces the behavior and semantics of Claude Code without inheriting any of its source.

## Key capabilities

<CardGroup cols={2}>
  <Card title="33+ built-in tools" icon="wrench" href="/reference/tools/overview">
    File read/write/edit, Bash, Glob, Grep, WebFetch, WebSearch, NotebookEdit, task management, cron scheduling, git worktrees, and more.
  </Card>

  <Card title="Multi-agent orchestration" icon="users" href="/advanced/multi-agent">
    Spawn sub-agents via the `Task` tool. Coordinator mode directs parallel worker agents across research, synthesis, implementation, and verification phases.
  </Card>

  <Card title="MCP integration" icon="plug" href="/advanced/mcp-integration">
    Connect any Model Context Protocol server over stdio. Tools are dynamically registered and namespaced per server at runtime.
  </Card>

  <Card title="ratatui TUI" icon="terminal" href="/concepts/architecture">
    A full interactive terminal UI with streaming output, input history, permission dialogs, a status bar, and a braille spinner — no browser required.
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build and run Claurst in under five minutes.
  </Card>

  <Card title="Architecture" icon="sitemap" href="/concepts/architecture">
    Understand the crate structure and how the agentic loop works.
  </Card>

  <Card title="Commands reference" icon="square-terminal" href="/reference/commands/overview">
    All 34 slash commands: `/help`, `/compact`, `/model`, `/mcp`, `/plan`, and more.
  </Card>

  <Card title="Tools reference" icon="screwdriver-wrench" href="/reference/tools/overview">
    Full reference for every tool Claude can invoke on your behalf.
  </Card>
</CardGroup>

## 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 in [`spec/`](https://github.com/yocxy2/claurst/tree/main/spec) — 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 in [`src-rust/`](https://github.com/yocxy2/claurst/tree/main/src-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 personality
* **`PROACTIVE` / `KAIROS`** — Always-on persistent assistant that watches, logs, and proactively acts on observations
* **`COORDINATOR_MODE`** — Multi-agent orchestration where Claude directs parallel worker agents

These flags are inactive in standard builds. See [Feature flags](/configuration/feature-flags) for details.
