> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckbrain.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

> Install the duckbrain CLI from a checkout

## Requirements

* `bun >= 1.3`, `duckdb >= 1.5.4` (`brew install duckdb`), `rg`
* macOS (Apple Silicon tested); crawlers install from `openclaw/tap` via Homebrew

## One-line install

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/autonoco/duckbrain/main/install.sh | sh
```

Installs bun/duckdb/ripgrep if missing (via Homebrew), clones the source to `~/.duckbrain/src`, and links `duckbrain` onto your PATH. **Re-run any time to update.** Then:

```bash theme={null}
duckbrain init && duckbrain doctor
```

## Manual install (from your own checkout)

```bash theme={null}
git clone https://github.com/autonoco/duckbrain && cd duckbrain
bun install
cd apps/duckbrain && bun link      # symlinks `duckbrain` onto your PATH
duckbrain init && duckbrain doctor
```

Bun executes the TypeScript directly — no build step; every `git pull` updates the installed CLI. Uninstall with `bun unlink`; data in `~/.duckbrain/` is untouched.

## Data layout

```
~/.duckbrain/<instance>/
├── catalog.sqlite     # DuckLake catalog (WAL) — includes inlined small writes: back this up
├── lake/              # Parquet data files (system of record)
├── search.duckdb      # FTS sidecar — disposable, rebuilt by `duckbrain index`
├── search.lance       # vector sidecar — disposable, rebuilt by `duckbrain index`
└── state.sql          # agent surface: duckdb -init ~/.duckbrain/<instance>/state.sql
```


## Related topics

- [init](/commands/init.md)
- [Sources Overview](/sources/overview.md)
