Documentation

Everything you need to install, configure, and use wiki-builder.

What is wiki-builder?

wiki-builder is a command-line tool that uses an LLM to build and maintain a personal knowledge base as a folder of structured markdown files. You feed it source documents — papers, articles, notes, PDFs — and it writes summaries, concept pages, entity pages, cross-references, and a running index. Over time the wiki compounds.

Unlike retrieval-augmented generation (RAG), which re-derives context from raw documents on every query, wiki-builder integrates sources into a persistent wiki. Queries run against already-synthesized knowledge, which makes answers faster, more coherent, and easier to trace.

How it works

The core loop is simple:

  1. You run wiki init to scaffold a project folder.
  2. You drop source documents into raw/.
  3. You run wiki ingest <file>. The LLM reads the source and writes structured pages into wiki/.
  4. You run wiki query "..." to ask questions. The LLM reads the wiki and synthesizes an answer.
  5. You run wiki lint occasionally to keep the wiki healthy.

The LLM is given five file tools — read, write, append, list, search — and a schema.md file that defines how pages should be structured. It uses those tools autonomously to maintain the wiki.

The wiki structure

After initialization, a project looks like this:

my-research/
├── schema.md          # behavioral spec — the LLM reads this every run
├── .gitignore
├── raw/               # your source documents (immutable)
│   └── assets/
└── wiki/              # LLM-maintained knowledge base
    ├── index.md       # master catalog of all pages
    ├── log.md         # append-only operation log
    ├── sources/       # one summary page per source document
    ├── concepts/      # topic and theory pages
    └── entities/      # people, orgs, products, events

The schema

schema.md is the LLM's behavioral spec. It defines directory layout, page structure, YAML frontmatter, cross-linking rules, naming conventions, and the step-by-step workflows for ingest, query, and lint. The LLM reads it at the start of every operation.

You can edit schema.md to customize behavior for your domain — change page structure, add new conventions, or adjust what the LLM prioritizes — without touching any code.

What the LLM writes

After ingesting a source document, the LLM typically creates or updates:

All pages include YAML frontmatter and markdown cross-links to related pages.

Supported providers

wiki-builder works with Anthropic (default, claude-opus-4-6) and OpenAI (gpt-4o). You can switch providers per command or set a default with wiki config. See the providers page for details.

Where to go next