Command reference
Every command, flag, and example for the wiki CLI.
wiki init
Scaffold a new wiki project. Creates the directory structure, a schema.md behavioral spec, and starter index.md and log.md files.
wiki init <path> [--name NAME]
| Flag | Description |
|---|---|
--name, -n | Human-readable name for the wiki. Used in index and log headings. |
Examples:
wiki init my-research/
wiki init my-research/ --name "ML Paper Notes"
wiki ingest
Read a source document and integrate it into the wiki. The LLM writes a source summary page, creates or updates concept and entity pages, refreshes index.md, and appends an entry to log.md.
wiki ingest <source> [flags]
| Flag | Description |
|---|---|
--wiki, -w | Override the wiki root directory. Defaults to auto-discovery (walks up from current directory looking for schema.md). |
--provider, -p | LLM provider: anthropic or openai. |
--model, -m | Model name override, e.g. claude-sonnet-4-6 or gpt-4o-mini. |
--thinking | Show the model's extended reasoning steps (Anthropic only). |
--delete-pdf | Delete the original PDF after converting to text. |
Examples:
# Ingest a markdown file
wiki ingest raw/paper.md
# Use OpenAI with a cheaper model
wiki ingest raw/article.md --provider openai --model gpt-4o-mini
# Ingest a PDF (requires pdftotext)
wiki ingest raw/paper.pdf --delete-pdf
# Show the model's reasoning
wiki ingest raw/notes.md --thinking
.md, .txt, .rst, and other plain text files. PDFs are auto-converted to text when pdftotext is installed.
wiki query
Ask a question against the wiki. The LLM reads index.md to find relevant pages, reads those pages, and synthesizes an answer. With --save, the answer is filed back into the wiki as a new concept page.
wiki query "<question>" [flags]
| Flag | Description |
|---|---|
--wiki, -w | Override wiki root directory. |
--save, -s | Save the answer back into the wiki as a new concept page. |
--format, -f | Output format: markdown (default), table, or marp (slide deck). |
--output, -o | Write the answer to a file instead of printing to stdout. |
--provider, -p | LLM provider override. |
--model, -m | Model name override. |
--thinking | Show extended reasoning steps (Anthropic only). |
Examples:
# Basic query
wiki query "what is the transformer architecture?"
# Get a comparison table
wiki query "compare attention mechanisms across these papers" --format table
# Save a good answer back into the wiki
wiki query "summarize everything I know about RLHF" --save
# Write to a file
wiki query "what are the key open problems?" --output open-problems.md
# Generate a Marp slide deck
wiki query "give me a presentation on self-attention" --format marp --output slides.md
--save on high-quality queries. Answers filed back into the wiki become reusable knowledge that improves future queries.
wiki lint
Run a health check across the wiki. The LLM reads all pages and reports issues. With --fix, it repairs them automatically.
wiki lint [flags]
| Flag | Description |
|---|---|
--wiki, -w | Override wiki root directory. |
--fix | Automatically fix issues instead of just reporting them. |
--provider, -p | LLM provider override. |
--model, -m | Model name override. |
--thinking | Show extended reasoning steps (Anthropic only). |
What lint checks for:
- Orphan pages — pages with no inbound links from other wiki pages.
- Missing cross-references — entities or concepts mentioned in pages but not linked.
- Contradictions — conflicting claims across different pages.
- Stale or vague claims — assertions that should be updated or clarified.
- Concepts without their own page — ideas mentioned across multiple pages that deserve a dedicated page.
- Outdated
index.mdentries — pages that exist but aren't listed, or listed but don't exist.
Examples:
# Report only
wiki lint
# Auto-fix issues
wiki lint --fix
wiki status
Show a summary of the wiki — page counts by type, raw file count, total word count. Does not call the LLM.
wiki status [--wiki PATH]
Example output:
Wiki: AI Research
Sources: 12
Concepts: 34
Entities: 18
Raw files: 12
Words: 24,310
wiki config
Manage provider, model, and API key settings. Saved to ~/.wiki-builder/config.json.
wiki config [flags]
| Flag | Description |
|---|---|
--provider | Set the default provider: anthropic or openai. |
--api-key | Save the API key for the selected provider. |
--model | Set the default model name. |
--show | Print the current configuration. |
Examples:
# Set Anthropic as default
wiki config --provider anthropic --api-key sk-ant-...
# Switch to OpenAI
wiki config --provider openai --api-key sk-...
# Use a specific model by default
wiki config --model claude-sonnet-4-6
# Show current config
wiki config --show
Next: Providers & models