LLM Wiki

Help

How to use LLM Wiki.

Everything you can do in the app, in the order you'd typically do it. For the why-it-exists story see About; for how it's built see Developers.

Mental model

The three layers

Three layers live in the wiki folder you chose:

  • raw/Your sources, untouched. Whatever you pasted or uploaded, byte-for-byte. Never deleted by the app.
  • wiki/The LLM-maintained pages. Cross-linked, short, structured. Lossy by design — they summarize raw/.
  • CLAUDE.mdThe schema. A few paragraphs of plain English telling the LLM what this wiki is about and how to organize it. The LLM reads it on every operation.

And three operations the LLM performs against those layers:

  • IngestRead a new source → write/update wiki pages, refresh the index, log the change.
  • QueryRead your question + the wiki → produce a cited answer.
  • LintRead the whole wiki → flag contradictions, broken links, orphans, missing pages, stale claims.

Multiple wikis

Holding more than one wiki

A wiki is meant to focus on one topic (the schema you set on first run tells the LLM what scope it should stay inside). For separate topics — say Physics, Machine learning research, and a Personal knowledge base — you keep separate wiki folders and switch between them.

Open Settings → Wikis. You'll see your currently-active wiki at the top and any others you've created or visited. Two things you can do:

  • Switch — click Switch on a row. The whole app re-points to that wiki on the next request. No restart, no port change. Your other wiki stays exactly where it is on disk.
  • Create new wiki — give it a topic + folder path, click Create + switch. The folder is created, schema initialized, you land on the dashboard ready to add sources.

The active wiki is per-app-install (not per-browser-tab). If you want to browse two wikis truly side-by-side, run two dev servers on different ports — one terminal with LLM_WIKI_PATH=~/wiki-a pnpm dev and another with LLM_WIKI_PATH=~/wiki-b pnpm dev.

Removing a wiki from the picker only edits the config — the folder + files stay on disk. If you really want to delete a wiki, remove the folder yourself (rm -rf ~/wiki-foo).

First-run

Setting up: topic + API key

When you open the app for the first time you'll see a setup card asking for two things:

  1. Wiki topic. One line describing what this wiki is about (e.g. "Quantum computing research and the algorithms underlying it"). The LLM reads this on every operation, so specific is better than generic.
  2. OpenRouter API key. Get one at openrouter.ai/keys — pay-as-you-go, one key gives access to Claude, GPT, Gemini, Llama, more. Stored safely on your machine.
    Note: If you plan to use local Ollama for all models, you do not need an OpenRouter key! You can skip this key setup step during onboarding and configure Ollama in Settings.

You can change either later in Settings.

Adding to the wiki

Sources — getting content in

Go to Sources and pick a mode at the top:

  • Paste — drop text or markdown in the textarea. Fastest for "I just want to add this article."
  • File — drag a file in or click to choose. Supported: .md / .txt / .html / .pdf / .docx / .pptx / .xlsx / .png / .jpg / .webp. PDFs and images go through a vision model; everything else is text-extracted locally.
  • URL — fetches the page, runs Mozilla's Readability to strip nav/ads/sidebars, ingests the clean article.

The page shows a cost preview before you ingest so there are no surprises. Click Ingest; ~10–30s later you'll see a summary of new pages, updated pages, and any contradictions the LLM flagged.

Above the form, Ingested sources lists everything you've added with format, size, date, and how many wiki pages it contributed to. Click any row to see the original + full lineage.

Reading

The wiki — browsing your pages

/wiki shows your pages as cards grouped by type (Overviews → Concepts → Entities → Comparisons → Sources). Each card shows the title, a short summary, tags, and when it was last touched.

Click any card and you'll see:

  • The page body, rendered as readable prose.
  • Sources at the bottom — chips linking to the raw inputs the LLM compiled this page from.
  • Backlinks — every other wiki page that mentions this one. The graph view in list form.
  • An Edit button in the header. Editing is a real split-pane markdown editor; saves back up the prior version to .llm-wiki/page-history/.

The sidebar has a filter input — type to narrow the page list. Or press ⌘K anywhere to fuzzy-find by title.

Asking questions

Query vs Chats — when to use which

Two ways to ask the wiki things:

Query — one-shot Q&A

For "ask once and move on." Each question is independent; no memory between them. Answer comes with cited pages and an optional Save as wiki page button if it's promotion-worthy.

Chats — multi-turn threads

For ongoing investigations. Each chat is a real markdown file in chats/. Pin, rename, move between folders. Every assistant message has its own Save as wiki page link; the whole chat has an Ingest → wiki button in the header so the synthesis becomes permanent pages.

Wiki health

Lint — finding rot before it spreads

/lint runs two passes: a fast local scan (broken [[wikilinks]], orphan pages) and an LLM pass for things a local scan can't see (contradictions between pages, missing pages that probably should exist, stale claims, gaps).

Per-issue fix buttons:

  • Remove broken link — strips the bad [[slug]] from its host page. Local, free, instant.
  • Create page / Create stub — drafts a small page for a missing slug using context from the pages that reference it. LLM-powered, ~$0.01 per click.
  • Apply suggested fix — sends the affected page + the LLM's suggestion to the lint model, writes the rewritten page back. Backed up to .llm-wiki/page-history/.

Bulk fixes at the top of the page:

  • Rebuild index — rewrites index.md from the page files on disk. Adds missing entries, removes orphans. Free, local.
  • Remove all broken links (N) — confirm-then-apply for every local-detected broken link in one pass.

The Recent runs panel shows the trend — each lint run gets a one-line entry in log.md. After fixes, re-run and watch the count drop (in green).

Seeing the shape

Graph — your knowledge as a 3D network

/graph renders your wiki as a 3D force-directed graph. Each page is a node; each [[wikilink]] between two pages is an edge. The same look-and-feel as Obsidian's graph view, but with one important difference:

Nodes are colored by page type, not by tag or folder. The LLM assigns a type to every page during ingest, so the graph gives you an at-a-glance read of what kind of knowledge your wiki holds:

  • Red — Overviews (high-level synthesis pages)
  • Cyan — Concepts (ideas, techniques, frameworks)
  • Amber — Entities (people, organizations, places)
  • Violet — Comparisons (two-or-more-things contrasted)
  • Slate — Source-type pages

Node size scales with link count (degree). Heavily- connected pages grow larger — they're your wiki's central concepts. Particles flowing along edges show direction.

Click a node to focus it: the camera flies to it, neighbors stay full-color, non-neighbors fade out. The side panel shows the page's preview, tags, and a clickable list of every connected page — letting you walk the graph by associations instead of by name. URL updates to /graph?node=<slug> so you can bookmark or share a focused view.

As you ingest more sources you'll watch the graph grow: new nodes spring into place, and edges form from any existing pages that mention the new one.

Telling the LLM what you want

Schema — editing CLAUDE.md

/schema is a split-pane editor for the schema file the LLM reads on every operation. Default contents are generic; replace with your specifics to make the agent's output dramatically better.

What works well in a schema:

  • What this wiki is about, in 1–3 sentences.
  • What kinds of pages you want (and don't want) — e.g. "entities for researchers but not for institutions".
  • Naming conventions for slugs you care about.
  • Subject-matter pet peeves the LLM should respect (e.g. "don't conflate quantum advantage with quantum supremacy").

Saves back up the prior version to .llm-wiki/schema-history/ (last 10 kept).

Tuning the loop

Settings — models, costs, key

  • General — wiki topic, theme (light / dark / auto).
  • Models — pick a provider (OpenRouter or local Ollama) and a model for each operation (ingest, query, chat, lint, vision). You can mix and match cloud models and local inference. Dropdowns of curated choices plus a custom-slug field for anything else. If you pick Ollama anywhere, see the local models setup guide for installation + hardware requirements per model — Ollama needs to be running locally before those slots will work.
  • API — OpenRouter key. Test before saving; mask after. (Not needed if you only use local Ollama!).
  • Costs — running tally of input/output tokens per model + estimated $ spend.
  • About — version, license, links.

Rule of thumb: cheap-fast model for ingest (you'll run it a lot), smarter model for query / lint / chat (user-facing answers).

Want to run models locally?

Local models (Ollama) — separate setup guide

Ollama lets you run LLMs on your own machine for free (after the one-time model download), keeping all your data local. LLM Wiki supports it as a per-slot provider in Settings → Models.

Because Ollama itself needs to be installed + running before LLM Wiki can talk to it, plus picking the right model depends heavily on what hardware you have, the full setup lives on its own page:

→ Open the Ollama setup guide

Covers: install steps for macOS / Linux / Windows, pulling models, a hardware-requirements table showing RAM / disk / speed per model on common machines, a quick picker for which model to start with based on your specs, and troubleshooting common errors.

Across all wikis

The health dashboard

The per-wiki home page (/) shows numbers for whatever wiki is currently active. The dashboard at /dashboard shows the same numbers for every wiki you've ever opened, side by side — pages, sources, chats, LLM spend, last touched. Sorted by recency so the wikis you actually use bubble to the top.

A rollup row across the top adds them all up — the cumulative spend answers the "how much have I actually spent on this app" question that per-wiki cost numbers can't.

Three ways to get there: footer link (every screen), LLM spend tile on the home page, ⌘K → Dashboard. Each card has a Switch → button to jump into that wiki.

The folder

Where everything lives on disk

Your wiki folder (default ~/llm-wiki-default, override with LLM_WIKI_PATH):

~/llm-wiki-default/
├── CLAUDE.md              # the schema you edit at /schema
├── index.md               # auto-maintained catalog of pages
├── log.md                 # every ingest / edit / lint / schema-save
├── raw/                   # original source files, untouched
├── wiki/                  # LLM-maintained pages
├── chats/                 # chat threads as .md files
└── .llm-wiki/             # SQLite + page-history + schema-history

You can browse log.md through the app at /log. Everything else is plain markdown — open it in Obsidian, VS Code, vim, or sync with iCloud / git. If you uninstall the app, the folder remains valid and useful.

Staying current

Updating to a new version

The app is published to npm as @syasas/llm-wiki. New versions ship as patch / minor releases; check GitHub Releases for the changelog.

If you installed via npm install -g, stop the running server first (Ctrl+C), then in any terminal:

npm install -g @syasas/llm-wiki@latest
llm-wiki version     # confirm the new version
llm-wiki start       # back up and running

If you installed from source (git clone): from the repo root, git pull && pnpm install, then restart pnpm dev.

Your wiki data is safe across upgrades. The on-disk format is stable within v1.x — folder, schema, pages, chats, history, and your OpenRouter key all carry over intact. When schema migrations ship in future versions, they run automatically on the next server start; no manual step.

If llm-wiki version still prints the old number after upgrading, open a new terminal window — sometimes (especially on Windows) the shell needs to re-resolve PATH after npm install -g replaces the binary.

When things go sideways

Troubleshooting

  • “OpenRouter API key not configured” (when not using Ollama)

    Open Settings → API and paste a key from openrouter.ai/keys. If you wanted to use local Ollama, make sure that Settings → Models has the provider for the active module set to Ollama.

  • “server error from Ollama / LocalTunnel (502)” or connection hanging

    Your local Ollama instance on port 11434 is down or your LocalTunnel endpoint has disconnected/timed out. Make sure `ollama serve` is active and running on your local machine, and your `.env` has the correct `OLLAMA_BASE_URL`.

  • “model not available on OpenRouter: anthropic/claude-3-5-sonnet”

    Providers retire models periodically. Settings → Models → switch the affected slot to a current model from the dropdown.

  • "LLM response failed schema validation"

    The model returned malformed JSON. Click Ingest again — small models occasionally drift. If it keeps happening, switch the ingest slot to a smarter model (Sonnet, GPT-4o).

  • Lint keeps flagging the same fixed issue

    The page got edited but the index summary went stale. Click Rebuild index in the Lint page's Bulk fixes.

  • Dev server feels slow / clicks not registering

    Dev-mode Next.js compiles routes lazily. First click to a route is slow; subsequent are fast. Loading skeletons should appear instantly — if they don't, refresh the browser.

  • llm-wiki: command not found after npm install -g

    npm put the binary somewhere that isn't on your PATH. Run npm prefix -g to find where, then echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc. Common on WSL Ubuntu with a non-standard npm prefix.

  • Standalone server crashes immediately after install with a native module error

    Some Linux distros need build tools to compile better-sqlite3 / keytar if no prebuilt binary matches. On Debian/Ubuntu: sudo apt install build-essential python3 libsecret-1-dev, then reinstall.