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

# Installation

> Build Claurst from source or install a pre-built binary. Covers prerequisites, PATH setup, environment variables, and compile-time feature flags.

## Prerequisites

Before installing Claurst, make sure you have the following:

* **Rust 1.75 or later** — Install via [rustup.rs](https://rustup.rs). Verify with `rustc --version`.
* **Cargo** — Included with the standard Rust toolchain.
* **An Anthropic API key** — Obtain one from the [Anthropic console](https://console.anthropic.com).
* **Linux or macOS** — Claurst uses the [`nix`](https://docs.rs/nix) crate for process management, signal handling, and user queries. Windows support is limited.

<Warning>
  Claurst relies on the `nix` crate (v0.29) with the `process`, `signal`, and `user` feature set. These features are Unix-only. On Windows, the `BashTool` falls back to `cmd /C` and the `PowerShellTool` uses `pwsh`, but some subsystems may not function correctly.
</Warning>

## Build from source

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/yocxy2/claurst
    ```
  </Step>

  <Step title="Build the release binary">
    ```bash theme={null}
    cd claurst/src-rust
    cargo build --release
    ```

    Cargo downloads all dependencies declared in `Cargo.toml` and compiles the full workspace. The first build takes a few minutes. Subsequent builds are incremental.

    The compiled binary is placed at:

    ```
    claurst/src-rust/target/release/claude
    ```
  </Step>

  <Step title="Verify the build">
    ```bash theme={null}
    ./target/release/claude --version
    ```

    You should see the version string printed to stdout.
  </Step>
</Steps>

## Pre-built binary

<Note>
  Pre-built binaries are not yet published to a package registry. Until then, build from source using the steps above. Watch the [GitHub releases page](https://github.com/yocxy2/claurst/releases) for binary distributions.
</Note>

## Add to PATH

To run `claude` from any directory without specifying the full path, add the binary to your `PATH`.

<Tabs>
  <Tab title="bash">
    ```bash theme={null}
    # Add to ~/.bashrc
    echo 'export PATH="$HOME/claurst/src-rust/target/release:$PATH"' >> ~/.bashrc
    source ~/.bashrc
    ```
  </Tab>

  <Tab title="zsh">
    ```bash theme={null}
    # Add to ~/.zshrc
    echo 'export PATH="$HOME/claurst/src-rust/target/release:$PATH"' >> ~/.zshrc
    source ~/.zshrc
    ```
  </Tab>

  <Tab title="Copy to a system directory">
    ```bash theme={null}
    # Copy the binary to a directory already on your PATH
    sudo cp ./target/release/claude /usr/local/bin/claude
    ```
  </Tab>
</Tabs>

After updating your shell profile, open a new terminal session and run:

```bash theme={null}
claude --version
```

## Environment variables

### Required

| Variable            | Description                                         |
| ------------------- | --------------------------------------------------- |
| `ANTHROPIC_API_KEY` | Your Anthropic API key. Required for all API calls. |

Set it in your shell profile for permanent effect:

<CodeGroup>
  ```bash bash / zsh theme={null}
  export ANTHROPIC_API_KEY="sk-ant-..."
  ```

  ```bash fish theme={null}
  set -x ANTHROPIC_API_KEY "sk-ant-..."
  ```
</CodeGroup>

You can also pass it at runtime with the `--api-key` flag:

```bash theme={null}
claude --api-key "sk-ant-..." "Explain this codebase"
```

### Optional

| Variable               | Description                                                                                                 |
| ---------------------- | ----------------------------------------------------------------------------------------------------------- |
| `ANTHROPIC_BASE_URL`   | Override the API base URL. Useful for custom endpoints or proxies. Defaults to `https://api.anthropic.com`. |
| `BRAVE_SEARCH_API_KEY` | Enables the Brave Search API for the `WebSearch` tool. Falls back to DuckDuckGo Instant Answers if not set. |

The `ANTHROPIC_BASE_URL` variable is read by `Config::resolve_api_base()` at startup. If set, it overrides the compiled-in default for every API call in the session.

## Feature flags

Claurst supports several **compile-time feature flags** that gate advanced systems. These correspond to the original Claude Code feature gates and are inactive in standard builds.

Enable a flag by passing it to Cargo at build time:

```bash theme={null}
cargo build --release --features buddy
```

| Flag                   | What it enables                                                                                                                                                                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `BUDDY`                | Tamagotchi-style companion pet — deterministic gacha species, procedurally generated stats (`DEBUGGING`, `PATIENCE`, `CHAOS`, `WISDOM`, `SNARK`), and a Claude-authored personality on first hatch. Rendered as ASCII art beside your input prompt.          |
| `PROACTIVE` / `KAIROS` | Always-on assistant mode. Maintains append-only daily log files, receives `<tick>` prompts at intervals, and proactively acts on observations with a 15-second blocking budget. Includes exclusive tools: `SendUserFile`, `PushNotification`, `SubscribePR`. |
| `COORDINATOR_MODE`     | Multi-agent orchestration. Claude becomes a coordinator that spawns and directs parallel worker agents across research, synthesis, implementation, and verification phases. Activated at runtime with `CLAUDE_CODE_COORDINATOR_MODE=1`.                      |

<Warning>
  `PROACTIVE` / `KAIROS` mode gives Claude the ability to act without an explicit user prompt. Only enable it if you understand the implications. The 15-second blocking budget and append-only log design limit scope, but review the [feature flags documentation](/configuration/feature-flags) before use.
</Warning>

## Default model and token limits

Claurst ships with the following compiled-in defaults (from `cc-core`):

| Constant               | Value                   |
| ---------------------- | ----------------------- |
| Default model          | `claude-opus-4-6`       |
| Sonnet model           | `claude-sonnet-4-6`     |
| Default max tokens     | `32,000`                |
| Hard token limit       | `65,536`                |
| Auto-compact threshold | `90%` of context window |
| Max turns (default)    | `10`                    |

Override the model at runtime with `--model` or persistently via `/model` in the TUI. Override max tokens with `--max-tokens`.

## System requirements

| Requirement          | Details                                                          |
| -------------------- | ---------------------------------------------------------------- |
| OS                   | Linux or macOS (primary). Windows has partial support.           |
| Architecture         | x86\_64 and ARM64 supported via the Rust standard target matrix. |
| Rust edition         | 2021                                                             |
| Minimum Rust version | 1.75                                                             |
| Disk space (build)   | \~500 MB for dependencies and build artifacts                    |
| Disk space (binary)  | \~20 MB for the release binary                                   |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Run your first session and try the interactive TUI.
  </Card>

  <Card title="Feature flags" icon="flag" href="/configuration/feature-flags">
    Full reference for compile-time and runtime feature gates.
  </Card>

  <Card title="Settings" icon="gear" href="/configuration/settings">
    Configure model, permissions, MCP servers, and hooks via `settings.json`.
  </Card>

  <Card title="CLAUDE.md" icon="file-text" href="/configuration/claude-md">
    Add project-specific instructions that Claude reads at startup.
  </Card>
</CardGroup>
