Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

obsidian-llm-wiki-local

> AI 编程
Open source

Karpathy’s LLM Wiki, 100% local with Ollama. Drop Markdown notes → AI extracts concepts → your Obsidian wiki auto-links and grows. Zero sharing. Your notes stay

792 stars0 likes1 views
WebsiteGitHub

About

Karpathy’s LLM Wiki, 100% local with Ollama. Drop Markdown notes → AI extracts concepts → your Obsidian wiki auto-links and grows. Zero sharing. Your notes stay

obsidian-llm-wiki

Turn your raw notes into a self-improving, interlinked wiki — powered by a local LLM.

Drop a markdown file into a folder. The pipeline reads it, extracts concepts, and creates or updates wiki articles. If a draft is wrong, reject it and explain why; the next compile addresses your feedback. Over time, every note you add and every draft you review makes the wiki smarter.

Local-first, provider-flexible. Runs 100% locally with Ollama by default. Also works with any OpenAI-compatible endpoint — Groq, Together AI, LM Studio, vLLM, Azure OpenAI, and more.


[!NOTE] obsidian-llm-wiki is now in maintenance mode. → Check out Synto

Bug fixes will continue. New features are being developed in Synto — the successor with a broader scope than the Obsidian LLM wiki pattern.

Migration is handled by Synto's migration command: point it at your existing vault and it converts the project to Synto's format. Your notes and wiki content remain the source of truth. If you're happy with what this tool does today, it keeps working; when you're ready for more, Synto provides the upgrade path.



The idea (Karpathy's LLM Wiki)

This project is a practical implementation of the pattern described by Andrej Karpathy in "The LLM Wiki" — a vision for a personal knowledge base where:

"The LLM doesn't just store what you tell it — it synthesizes, cross-references, and keeps everything current. You add raw material; it does the bookkeeping."

The key insight: treat your notes as source material, not as the final artifact. The LLM compiles them into a structured wiki that grows smarter as you add more. Unlike a chatbot that forgets, the wiki persists and compounds.

You write raw notes  →  LLM extracts concepts  →  Wiki articles created/updated
     raw/                    (automatic)                    wiki/
  quantum.md          "Qubit", "Superposition"       Qubit.md   ←──┐
  ml-basics.md        "Neural Network", "SGD"    Superposition.md  │
  physics.md          "Qubit" (again!)           Neural Network.md │
                                                      ↑  linked via [[wikilinks]]

The wiki lives in Obsidian, so you get the graph view, backlinks, and Dataview queries for free.


Features

Incremental compiles. Each concept gets its own article. When you change a source note, only the articles tied to that note recompile, not the whole vault.

File watcher. Run olw watch once and it processes anything you drop into raw/ automatically. Ingest and compile run in the background, so the wiki keeps improving while you keep writing notes.

Rejection feedback. Reject a draft and attach a reason. The next compile of that concept includes your feedback in the prompt, so the model can address it. Five rejections without an approval auto-blocks the concept until you re-enable it.

Hand-edits are preserved. Edit an article in Obsidian and the compiler will detect the change on the next run and skip it. Your edits aren't overwritten by regeneration.

Query and synthesize. olw query "what is X?" answers from your published wiki without embeddings or a vector DB. With --synthesize it saves the answer as a permanent wiki page, complete with source hashes and the same hand-edit protection.

Self-maintenance. Aliases like PC for Program Counter are extracted at ingest and used to repair broken wikilinks. olw lint reports orphans and stale articles; olw maintain --fix rewrites alias links and creates stubs for missing targets.

Provider-flexible. Ollama by default, fully offline. You can also point it at Groq, Together AI, LM Studio, vLLM, Azure OpenAI, or any OpenAI-compatible endpoint via olw setup. olw compare previews a switch in isolated vaults so you can decide before editing wiki.toml.

Multi-language. Each note's language is auto-detected at ingest and the article is written in that language. Extraction rules don't depend on hard-coded word lists, so any language works.

Git-aware. Every automatic action commits with an [olw] prefix, and olw undo reverts the last one. Raw notes are never modified; olw only writes to wiki/ and .olw/.


Quick start

1. Install

From PyPI (recommended):

bash
pip install obsidian-llm-wiki

Or with uv:

bash
uv tool install obsidian-llm-wiki

From source (latest development version):

bash
git clone https://github.com/kytmanov/obsidian-llm-wiki-local
cd obsidian-llm-wiki-local
python install.py

install.py detects uv or falls back to pip, verifies the install, and tells you to run the next step.

2. Install and start Ollama

bash
# Install Ollama: https://ollama.com/download
ollama pull gemma4:e4b      # fast model — analysis and routing
ollama pull qwen2.5:14b     # heavy model — article writing (optional, 7B+ recommended)

Minimal setup: pull only gemma4:e4b and set both fast and heavy to it in the wizard.

3. Run the setup wizard

bash
olw setup

An interactive wizard selects a provider, configures the URL and optional API key, picks fast and heavy models, sets an optional default vault, and offers experimental features. Takes ~30 seconds.

…

Settings are saved to ~/.config/olw/config.toml (Mac/Linux) or %APPDATA%\olw\config.toml (Windows). API keys are stored only in this user-private file, never in wiki.toml.

Experimental setup choices are saved only as defaults for new vaults. Runtime behavior is controlled by each vault's wiki.toml.

4. Set up your vault

bash
olw init ~/my-wiki

This creates the folder structure and a wiki.toml pre-filled with your setup wizard choices.

To enable experimental inline source citations for an existing vault:

bash
olw config inline-source-citations on --vault ~/my-wiki
olw config inline-source-citations status --vault ~/my-wiki

Turn them off at any time with:

bash
olw config inline-source-citations off --vault ~/my-wiki

Manual fallback:

toml
[pipeline]
inline_source_citations = true

5. Add some notes

Drop any .md files into ~/my-wiki/raw/. Web clips, book notes, meeting notes, anything.

~/my-wiki/raw/
  quantum-computing.md
  ml-fundamentals.md
  physics-lecture.md

6. Run the full pipeline

bash
# One command: ingest + compile + lint + optional auto-approve
olw run

# Or step by step:
olw ingest --all
olw compile
olw review        # interactive draft review

If you set a default vault in olw setup, the --vault flag is optional. Otherwise use --vault ~/my-wiki or export OLW_VAULT=~/my-wiki.

Open ~/my-wiki as an Obsidian vault. The graph view shows your connected wiki. Before approving drafts, use a draft-review graph filter:

-path:raw -path:wiki/sources -path:_resources -file:Welcome

After approving drafts, use a published-only graph filter:

-path:raw -path:wiki/sources -path:wiki/.drafts -path:_resources -file:Welcome

The published-only filter hides wiki/.drafts, so it will look empty until drafts are approved. Run olw doctor to print graph guidance for the current vault.

Want to preview a model or provider switch before changing wiki.toml?

bash
olw compare --heavy-model qwen2.5:14b

olw compare rebuilds isolated preview vaults from the same raw/ notes and tells you whether to switch, keep your current config, or review the diffs manually.

7. Keep it running (optional)

bash
olw watch
# Drop a file in raw/ → ingest + compile happen automatically (selective: only linked concepts)

Query synthesis

olw query answers from the published wiki without embeddings. Use --save to keep a dated Q&A note in wiki/queries/, or --synthesize to publish a reusable synthesis page in wiki/synthesis/.

bash
# Just answer in the terminal
olw query "What is backpropagation?"

# Save a dated Q&A note under wiki/queries/
olw query "What is backpropagation?" --save

# Save a reusable synthesis article under wiki/synthesis/
olw query "What is backpropagation?" --synthesize

Synthesis behavior:

  • synthesis pages are published notes tagged with synthesis
  • they store the source question, selected source pages, and source page body hashes in frontmatter
  • wiki/index.md includes a capped ## Synthesis section sourced from the DB, ordered by newest first and then title
  • compare runs stay side-effect-free: query evaluation never writes to the active vault during olw compare
  • query-time synthesis does not create a new [olw] git commit

Duplicate handling:

  • default behavior is keep_existing for the same normalized question
  • interactive terminals only prompt for a strategy when a duplicate already exists
  • save_with_suffix keeps the existing page and writes a new suffixed file
  • update_in_place rewrites the existing synthesis only when its body still matches the DB-tracked hash
  • if the existing synthesis was manually edited, update_in_place refuses to overwrite it
  • synthesis pages cannot cite another synthesis page as a source

Compare a new model or provider

olw compare is a vault switch advisor, not a benchmark harness. It compares your current vault config against one challenger config using the same active vault and the same raw/ notes.

bash
# Same provider, different heavy model
olw compare --heavy-model qwen2.5:14b

# Try a different local provider
olw compare \
  --provider lm_studio \
  --provider-url http://localhost:1234/v1 \
  --fast-model google/gemma-4-e4b \
  --heavy-model google/gemma-4-e4b

# Quick spot-check on a large vault
olw compare --heavy-model qwen2.5:14b --sample-n 20

What it does:

  • rebuilds the current config and challenger config in isolated preview vaults
  • writes reports under .olw/compare//
  • leaves your active raw/ and wiki/ untouched and does not modify active .olw/ state outside .olw/compare/
  • returns one verdict: switch, keep_current, or manual_review

Useful options:

  • --queries path/to/queries.toml adds a few representative questions to the comparison
  • --out /tmp/my-compare writes artifacts outside the vault if you want to inspect them elsewhere
  • --keep-artifacts retains the ephemeral preview vaults instead of deleting them after the run
  • --sample-n N limits the preview to the first N raw notes for a fast spot-check
  • --allow-cloud-upload is required when the challenger uses a cloud provider

Notes:

  • compare previews automated generated output, not the final curated vault after human review
  • the report includes a ready-to-copy wiki.toml snippet for the challenger when the verdict is switch

Minimal queries.toml example:

toml
[[query]]
id = "backprop"
question = "What is backpropagation?"
expected_contains = ["chain rule"]

Reports are written as Markdown and JSON by default:

  • report.md — recommendation-first summary with next steps
  • report.json — full machine-readable report
  • summary.json — compact verdict and reason summary

How it works

The pipeline has three stages, each using the LLM for a different purpose:

…

No vector databases, no embeddings. wiki/index.md acts as the routing layer for olw query. This keeps the setup simple and works well up to ~100 source notes.

The pipeline is intentionally conservative. Strong concepts become draft articles; explicitly evidenced named references become auditable knowledge item candidates. This keeps source-specific names visible without generating low-evidence articles from them.


Multi-language support

olw detects the language of each raw note during ingest and stores it. At compile time, the article is written in that language — no configurat

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythongit-based-wikikarpathyknowledge-basellm-knowledge-base

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.