# llmwiki

> Open-source CLI knowledge compiler that turns URLs, files, and session exports into an interlinked, citation-traced markdown wiki.

llmwiki, published by atomicstrata as the llm-wiki-compiler repository, compiles raw sources such as papers, documentation sites, notes, and session exports into a structured markdown wiki. The wiki can be browsed in a local viewer, queried from the CLI, exposed to agents over MCP, or driven through a TypeScript SDK. The latest release listed is v1.4.2, and the project is MIT licensed.

## What It Is

llmwiki is a knowledge compiler that implements the LLM Wiki pattern described by Andrej Karpathy. Rather than retrieving raw chunks at query time, it runs a two-phase LLM pipeline that extracts concepts, merges duplicates across sources, and generates typed pages (concept, entity, comparison, overview) with citations back to source files and line ranges. Output is plain markdown with YAML frontmatter, stored under a project's `wiki/` folder alongside `sources/` and `.llmwiki/` compiler state.

## Workflow and Outputs

You ingest URLs, files, or exported Claude, Codex, or Cursor sessions, then run compile to generate pages. `llmwiki query` narrows pages by embedding similarity, reranks with BM25, and expands along the wikilink graph to build evidence packs; answers can be saved back into the wiki, optionally held for review. `llmwiki view` opens a read-only browser UI with search, a page graph, and citation chips. Lint and eval commands check citations, links, freshness, and quality, and stale pages can be repaired with refresh. Exports include Open Knowledge Format bundles, JSON, JSON-LD, GraphML, Marp slides, and llms.txt.

## Configurable Lifecycle Profiles

A validated `.llmwiki/profile.json` can declare entity schemas, typed relations, lifecycle state machines, evidence gates, workflows, artifacts, connector bindings, content tiers, and retrieval policy. Built-in templates include AutoSci for research and Newsroom for editorial work; projects without a profile use the default concepts-and-queries layout. Template distributions can be signed and installed from trusted catalogs.

## Agent Integration and Setup

`llmwiki serve` runs an MCP server that lets compatible agents ingest, compile, query, lint, read pages, and request context packs. The npm package `llm-wiki-compiler` requires Node.js 24 or newer and a provider credential: Anthropic, OpenAI-compatible endpoints, Ollama, GitHub Copilot, Claude Agent SDK or Codex CLI local login, Atlas Cloud, or OrcaRouter. The README notes that native Windows validation is still outstanding.

## Features
- Two-phase LLM compile pipeline producing typed, interlinked markdown wiki pages
- Citation tracing to source files and line ranges
- Hybrid retrieval with embeddings, BM25 reranking, and wikilink graph expansion
- Configurable Lifecycle Profiles with typed entities, relations, workflows, and gates
- AutoSci and Newsroom built-in templates
- Local web viewer with search, graph, and four themes
- Review queue and review policy for generated pages
- Lint and eval for citation, link, and freshness quality
- Stale page refresh
- Open Knowledge Format export and import
- Export to JSON, JSON-LD, GraphML, Marp, and llms.txt
- MCP server for agents
- TypeScript SDK via createWiki
- Incremental and parallel compilation
- Session ingestion from Claude, Codex, and Cursor exports

## Integrations
Claude Desktop, Cursor, Claude Code, Anthropic, OpenAI-compatible endpoints, Ollama, GitHub Copilot, Atlas Cloud, OrcaRouter, Open Knowledge Format, Crossref, Atomic Memory, Obsidian

## Platforms
WINDOWS, LINUX, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
1.4.2

## Links
- Website: https://llmwiki.atomicstrata.ai
- Documentation: https://llmwiki.atomicstrata.ai/introduction
- Repository: https://github.com/atomicstrata/llm-wiki-compiler
- EveryDev.ai: https://www.everydev.ai/tools/llmwiki
