Documentation
Everything about LLM Wiki.
From install through advanced use. Read top-to-bottom for the full picture, or jump to a section via the table of contents. Current release: v1.2.3.
The idea
What is LLM Wiki?
LLM Wiki is a local-first knowledge base maintained by an LLM agent. You drop in sources — articles, papers, notes, PDFs, URLs — and an agent reads them and writes a cross-linked markdown wiki you fully own.
It implements Andrej Karpathy's LLM Wiki pattern from April 2026 — three layers (raw sources, wiki, schema) and three operations (ingest, query, lint). The result is a knowledge base that compounds: each source makes every page richer, not just one new page longer.
The thing that makes it not-another-RAG-app: it accumulates something readable. RAG chatbots rediscover your corpus on every query and leave nothing behind. Note apps put all the maintenance burden on you. LLM Wiki sits between them — the LLM does the maintenance, the wiki accumulates value, you own the markdown files.
In two commands
Get started
One install, one command to run:
npm install -g @syasas/llm-wiki llm-wiki start
That opens http://localhost:3737 in your browser. A first-run wizard collects two things: a one-line topic for the wiki (what is this knowledge base about?) and an LLM provider — either an OpenRouter API key (cloud) or a local Ollama install (see Local models).
Prerequisites: Node 20+ (nodejs.org). Verified on macOS, Linux (incl. WSL), Windows.
Your wiki lives at ~/llm-wiki-default by default — plain markdown files in a folder you fully own. Delete the app and your wiki keeps working (open it in Obsidian, vim, VS Code, anything).
Karpathy's pattern
The three operations
Every interaction with the LLM falls into one of three buckets:
Ingest
Drop a source (text / PDF / URL / image). The LLM reads it alongside your existing wiki, writes new pages, updates older pages where context shifts, refreshes the index, logs the change. Each ingest is a refactor pass — not an append.
Query
One-shot Q&A against the whole wiki with cited pages. 'Save as wiki page' promotes useful answers into permanent entries. For ongoing back-and-forth, use Chats — saved as plain markdown files in chats/.
Lint
Two-pass health check: local scan for broken links + orphans, then an LLM pass for contradictions, gaps, stale claims. Every issue ships with one-click fixes, including LLM-powered ones that write the page edit for you.
All three run against the same on-disk folder. There's no hidden state, no separate database to migrate, no opaque embeddings cache. SQLite at .llm-wiki/meta.sqlite is just a search/index cache — derivable from the markdown at any time.
Getting content in
Adding sources
The Sources page (/sources) accepts three modes:
- Paste — text or markdown, dropped into a textarea. Fastest for "I just want to add this article."
- File — drag-in or click to choose. Supported:
.md/.txt/.html/.pdf/.docx/.pptx/.xlsx/.png/.jpg/.webp. PDFs and images route through a vision model; everything else is text-extracted locally. - URL — paste a link. The app fetches the page, extracts main content via Readability (the same engine Firefox Reader View uses), and ingests it.
Before ingestion runs, a cost preview shows estimated tokens + dollars based on the source length + your selected model. You can cancel if the estimate looks high.
Approval gate (optional, off by default): turn it on in Settings → General to preview every wiki change the LLM wants to make before it lands. Useful for researchers who want human-in-the-loop on every page edit.
Reading the result
Browsing your wiki
The Wiki view (/wiki) shows page cards grouped by type: Overviews → Concepts → Entities → Comparisons → Sources. Sidebar has search + a filter chip per type. Click a card to open the page.
Each page shows:
- The page body — markdown, rendered.
[[wikilinks]]are clickable. - Backlinks at the bottom — every other page that links INTO this one.
- Source lineage — which raw sources contributed to this page. Click any one to see its
/sources/[id]detail view (raw text + which pages it spawned/influenced). - An inline editor — click Edit, fix a typo, save. Backed up to
.llm-wiki/page-history/.
3D graph view at /graph — force-directed visualization of every page and every [[wikilink]], colored by page type. Drag to orbit, scroll to zoom, click any node to focus + open its side panel. Watch your knowledge grow spatially as you ingest more.
Query vs chats
Asking questions
Two interaction patterns, picked based on the conversation shape:
- Query (
/query) — one-shot question, cited answer, optionally promote to a permanent wiki page. Best for "I have a specific question and I want it answered now." - Chats (
/chats) — multi-turn threads, each saved as a.mdfile inchats/with frontmatter. Best for "I want to think out loud and explore." Per-message "Save as wiki page" + whole-chat "Ingest → wiki" buttons close the loop from exploratory thinking back into the permanent layer.
New in v1.2
Choosing a model provider (OpenRouter or Ollama)
Each operation slot (ingest / query / chat / lint / vision) can independently choose its provider in Settings → Models:
| OpenRouter (cloud) | Ollama (local) | |
|---|---|---|
| Cost per query | Pay-per-token (~$5 lasts weeks) | Free (electricity) |
| Privacy | Data sent to provider | Stays on your machine |
| Speed | Fast (always) | Depends on your hardware |
| Quality | Frontier (Claude 4.6, GPT-4o) | Solid open models (llama3, mistral) |
| Setup | Paste API key | Install Ollama + pull a model |
Mix and match per slot. A common pattern: heavy ingest on Ollama (free + you don't need to watch it), Chat on OpenRouter (interactive, want frontier quality), Vision on whichever has the better vision model for your case.
If all slots use Ollama, you don't need an OpenRouter key at all. The first-run wizard skips the key step when that's your setup.
Local model setup
Local models with Ollama
Running LLMs locally requires installing Ollama (a local LLM runtime) and pulling at least one model. Full step-by-step install + a hardware-requirements table per model lives in the in-app guide at /local-models once you have the app running.
Quick version
# macOS brew install ollama ollama pull llama3 # Linux curl -fsSL https://ollama.com/install.sh | sh ollama pull llama3 # Windows # Download installer from ollama.com/download ollama pull llama3
Then in LLM Wiki: Settings → Models → for any slot, change the Provider dropdown from OpenRouter to Ollama (Local) and pick the model you pulled.
Picking a model for your hardware
- 8 GB RAM laptop →
phi3(3.8B, 2.3 GB disk, fast) - 16 GB RAM, modern CPU/Apple Silicon →
llama3(8B, 4.7 GB disk, balanced) - 32 GB+ RAM →
mixtral(8x7B, 26 GB disk, near-frontier quality) - Apple Silicon 64 GB unified or workstation 64+ GB →
llama3:70b(40 GB disk, highest open-model quality) - Vision (PDFs, images) →
llavafor quality,moondreamfor speed
Rule of thumb on RAM: model file size + 4 GB should fit comfortably in free RAM. Running a model bigger than your free RAM swaps to disk → 10-50x slowdown → usually unusable.
One per topic
Multiple wikis
A wiki is meant to stay scoped to one topic (the schema you set on first run keeps the LLM focused). For separate topics — Physics, ML research, a Personal KB — keep separate wiki folders and switch between them in Settings → Wikis.
Switching is in-place: the whole app re-points to the new wiki on the next request. No restart, no port juggling. Your other wiki stays exactly where it was on disk.
Other entry points: the active-wiki chip in the header (next to the wordmark), and ⌘K → "Switch to" group.
Cross-wiki search lives in ⌘K too — search a page by title across every wiki you've opened, jump into the right one in one click.
Across all wikis
The health dashboard
/dashboard aggregates stats across every wiki you've opened: pages, sources, chats, cumulative LLM spend per wiki, last-touched timestamp. Roll-up tiles at the top sum the whole view. Sortable by recency. One-click switch into any wiki.
Answers the question per-wiki home pages can't: "how much have I actually spent on this app across all my projects?"
Latest release
What's new in v1.2
Released 2026-05-26. Headline change: local models support via Ollama, first-class as a per-slot provider.
- Per-slot provider picker in Settings → Models (OpenRouter or Ollama) — covered in detail in Choosing a model provider above.
- Amber heads-up banner in Settings when any slot uses Ollama — links to the in-app
/local-modelssetup guide so you don't hit the "Connection error" failure mode the first time. - New in-app
/local-modelspage with install commands (macOS / Linux / Windows), pull-a-model walkthrough, hardware requirements table for 9 common models, troubleshooting for the 6 errors users actually hit. - Backward compat: existing wikis upgrade transparently. The settings shape change (each slot went from
stringto{ provider, model }) is handled by a migration parser — no manual config edits.
First merged external contribution to the project — the Ollama work came from @savindugeethma via PR #2. The maintainer added the UX scaffolding around it (banner + setup guide) once a real user (himself) hit the failure mode. Full narrative in dev-log section V.
Patch releases
Three patches followed v1.2.0 in quick succession — worth knowing about if you installed early:
- v1.2.3 (2026-05-27) — free OpenRouter models added to the Settings → Models dropdown. Four curated
:freeroutes (Llama 3.3 70B, Nemotron Super 120B, DeepSeek V4 Flash, Gemma 4 31B) tagged withFREEin the dropdown. Settings banner explains rate limits + data-retention tradeoffs. First-run wizard gained a one-click Use free models by default toggle on the API-key step — two-click setup for a fully working zero-cost wiki (you still need a free OpenRouter account; only the credit is optional). - v1.2.2 (2026-05-26) — the CLI now prints an update-available banner on
llm-wiki startwhen a newer version is on npm. Cached on disk, refreshed in the background, silenced byNO_UPDATE_NOTIFIER=1. So future patch releases surface themselves — you find out the next time you start the app instead of having to check the repo. - v1.2.1 (2026-05-26) — fixes two regressions introduced by the v1.2.0 model-slot refactor: the Sources and Query pages crashed the moment text was typed or pasted, and PDF ingest failed with
Cannot read properties of undefined (reading '0'). PDFs now ride OpenRouter'stype: "file"contract; settings types match runtime. See the known-issues thread if you're stuck on v1.2.0.
Upgrade with npm install -g @syasas/llm-wiki@latest either way. Wiki data carries over unchanged.
For contributors
For developers
LLM Wiki is open source under the MIT license. PRs welcome. Before opening one, start with:
- CONTRIBUTING.md — prioritized task list (Quick wins / Medium / Big) showing what we actually need help with right now, plus the what-we-don't-want list so you don't spend time on rejected work
- docs/contributor-walkthrough.md — step-by-step fork / clone / branch / commit / push / PR with exact commands for first-time contributors
- CLAUDE.md — the project's design contract / do-don't list
Stack: Next.js 14 (App Router), TypeScript strict, Tailwind, shadcn-style primitives, better-sqlite3 (metadata cache), keytar (OS keychain for API keys), the openai SDK pointed at OpenRouter or Ollama, pnpm workspaces.
Coming soon
Hosted version
The thing you're reading right now is the marketing site for an eventual hosted LLM Wiki — sign in, click a button, start ingesting. Same engine as the open-source CLI (in fact, the cloud version literally npm installs the OSS packages), same markdown wiki underneath. We handle the server, you focus on the knowledge.
Currently in waitlist — drop your email on the home page form to hear when it launches.
In the meantime, the open-source version is fully usable today and stays the canonical thing. Local-first, free, MIT, no telemetry, no lock-in — install with npm install -g @syasas/llm-wiki.
When you're stuck
Getting help
- In-app docs — run
llm-wiki startand visit/helpfor a deep how-to guide,/aboutfor the story,/developersfor architecture - GitHub Issues — github.com/ddsyasas/llm-wiki/issues. Bug reports use a structured template (OS / Node / version / doctor output)
- GitHub Discussions — discussions for open-ended questions, ideas, "what if we did X"
- Security issues — private vulnerability reporting at /security/advisories/new (not public issues — please)
- Email — yasas@idersolutions.com for anything that doesn't fit the above