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]
FlagDescription
--name, -nHuman-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]
FlagDescription
--wiki, -wOverride the wiki root directory. Defaults to auto-discovery (walks up from current directory looking for schema.md).
--provider, -pLLM provider: anthropic or openai.
--model, -mModel name override, e.g. claude-sonnet-4-6 or gpt-4o-mini.
--thinkingShow the model's extended reasoning steps (Anthropic only).
--delete-pdfDelete 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
Supported formats: .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]
FlagDescription
--wiki, -wOverride wiki root directory.
--save, -sSave the answer back into the wiki as a new concept page.
--format, -fOutput format: markdown (default), table, or marp (slide deck).
--output, -oWrite the answer to a file instead of printing to stdout.
--provider, -pLLM provider override.
--model, -mModel name override.
--thinkingShow 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
Tip: Use --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]
FlagDescription
--wiki, -wOverride wiki root directory.
--fixAutomatically fix issues instead of just reporting them.
--provider, -pLLM provider override.
--model, -mModel name override.
--thinkingShow extended reasoning steps (Anthropic only).

What lint checks for:

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]
FlagDescription
--providerSet the default provider: anthropic or openai.
--api-keySave the API key for the selected provider.
--modelSet the default model name.
--showPrint 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