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

# Quickstart

> Install KiwiFS, start a server, write a page, and confirm it was searched and versioned.

This takes about five minutes. You need macOS or Linux (amd64 or arm64), or Docker.

**1. Install KiwiFS**

> [tab] Release binary
>
> Download the latest release for your platform and put it on your `PATH`:
>
> ```bash Terminal theme={null}
> OS=$(uname -s | tr '[:upper:]' '[:lower:]')
> ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
> curl -fsSL "https://github.com/kiwifs/kiwifs/releases/latest/download/kiwifs-$OS-$ARCH.tar.gz" | tar -xz
> sudo mv "kiwifs-$OS-$ARCH" /usr/local/bin/kiwifs
> kiwifs --version
> ```
>
> All builds are on the [releases page](https://github.com/kiwifs/kiwifs/releases), each with a `.sha256` checksum.

> [tab] Docker
>
> ```bash Terminal theme={null}
> docker run -d --name kiwifs -p 3333:3333 -v kiwifs-data:/data ameliaanhlam/kiwifs
> ```
>
> The container runs `kiwifs serve --root /data` and creates a knowledge base from the `kb` template on first start. Skip to step 4.
>
> To keep the files in a host folder instead of a named volume, see [Docker](https://docs.kiwifs.com/deploy/docker.md).

> [tab] From source
>
> Requires Go 1.27+, Node 20+, and `make`. The build compiles the web UI and embeds it in the binary.
>
> ```bash Terminal theme={null}
> git clone https://github.com/kiwifs/kiwifs.git
> cd kiwifs
> make build
> ./kiwifs --version
> ```
>
> > [!WARNING]
> >
> > `go install github.com/kiwifs/kiwifs@latest` does not work: the module does not include the built web UI, so the embed step fails. Use `make build`.

**2. Create a knowledge base**

```bash Terminal theme={null}
kiwifs init --root ./knowledge
```

This scaffolds the default `kb` template: sample pages, page schemas, a workflow, and a `.kiwi/` folder with configuration and an agent playbook.

**knowledge**

**.kiwi**

**config.toml**

**playbook.md**

**rules.md**

**schemas**

**templates**

**workflows**

**getting-started**

**guides**

**reference**

**index.md**

**SCHEMA.md**

Pass `--template` to start from something else, such as `wiki`, `memory`, `tasks`, `adr`, or `blank`. See [Init templates](https://docs.kiwifs.com/guides/templates.md) for all twelve.

**3. Start the server**

```bash Terminal theme={null}
kiwifs serve --root ./knowledge
```

Open [http://localhost:3333](http://localhost:3333) to see the web UI. The same port serves the REST API under `/api/kiwi/` and MCP over HTTP at `/mcp`.

> [!TIP]
>
> You can skip `init`. If the root has no `.kiwi/config.toml`, `serve` initializes it with the `kb` template first.

**4. Write a page**

Write through the API or straight to disk. Both go through the same pipeline.

```bash REST theme={null}
curl -X PUT 'http://localhost:3333/api/kiwi/file?path=notes/auth.md' \
  -H 'X-Actor: my-agent' \
  --data-binary $'# Authentication\n\nOAuth2 with JWT access tokens.\n'
```

```bash Filesystem theme={null}
mkdir -p knowledge/notes
printf '# Authentication\n\nOAuth2 with JWT access tokens.\n' > knowledge/notes/auth.md
```

The REST call returns the new ETag, which you pass as `If-Match` on later writes to detect conflicts:

```json theme={null}
{"etag":"934818f7f7cc3f1a23edc793a08bc8720fc05085","path":"notes/auth.md"}
```

**5. Verify it was indexed and versioned**

```bash Terminal theme={null}
curl 'http://localhost:3333/api/kiwi/search?q=jwt'
curl 'http://localhost:3333/api/kiwi/versions?path=notes/auth.md'
```

The search returns `notes/auth.md` with the match highlighted. The versions list shows one commit whose author is `my-agent`, or `fswatch` if you wrote to disk.

> [!TIP]
>
> Your knowledge base is running. Every write is now searchable within a moment and recorded as a git commit.

## Connect an agent

Point an MCP client at the running server. Your agent gets 78 tools for reading, writing, searching, querying, refactoring, and coordinating through drafts and claims.

> [tab] Claude Code
>
> ```bash Terminal theme={null}
> claude mcp add --transport http kiwifs http://localhost:3333/mcp
> ```

> [tab] Claude Desktop and Cursor
>
> ```json MCP config theme={null}
> {
>   "mcpServers": {
>     "kiwifs": {
>       "command": "kiwifs",
>       "args": ["mcp", "--remote", "http://localhost:3333"]
>     }
>   }
> }
> ```

> [tab] No server
>
> Without a running server, `kiwifs mcp` can open the folder directly:
>
> ```json MCP config theme={null}
> {
>   "mcpServers": {
>     "kiwifs": {
>       "command": "kiwifs",
>       "args": ["mcp", "--root", "/absolute/path/to/knowledge"]
>     }
>   }
> }
> ```
>
> Use `--remote` instead whenever `kiwifs serve` is running on the same folder, so that one process owns the writes.

See [MCP](https://docs.kiwifs.com/concepts/mcp.md) for the tool reference and remote auth.

## Next steps

> [card] [Configuration](https://docs.kiwifs.com/configuration.md)
>
> Auth, search, versioning, vector embeddings, and more.

> [card] [Agent interface](https://docs.kiwifs.com/concepts/agent-interface.md)
>
> Filesystem, REST, and MCP access patterns.

> [card] [Web UI](https://docs.kiwifs.com/guides/web-ui.md)
>
> Tree, editor, graph, Bases, and search.

> [card] [Deploy with Docker](https://docs.kiwifs.com/deploy/docker.md)
>
> Run KiwiFS in production with Docker Compose.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.