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:
- You run
wiki initto scaffold a project folder. - You drop source documents into
raw/. - You run
wiki ingest <file>. The LLM reads the source and writes structured pages intowiki/. - You run
wiki query "..."to ask questions. The LLM reads the wiki and synthesizes an answer. - You run
wiki lintoccasionally 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:
- A source summary page in
wiki/sources/with key findings and a reading log entry. - Concept pages in
wiki/concepts/for ideas, methods, and theories introduced by the source. - Entity pages in
wiki/entities/for people, organizations, tools, and systems mentioned. - Updates to
wiki/index.mdand an entry inwiki/log.md.
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
- Installation & setup — install the CLI, set an API key, run the quickstart.
- Command reference — every command, flag, and example.
- Providers & models — configure Anthropic or OpenAI.