[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2105":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":8,"rankLanguage":8,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},2105,"llm-wiki","domleca\u002Fllm-wiki","domleca",null,"TypeScript",164,13,4,5,0,6,35,3.44,"MIT License",false,"main",[],"2026-06-12 02:00:37","# LM Wiki\n\nThis project was inspired by [Andrej Karpathy's post on LLM knowledge bases](https:\u002F\u002Fx.com\u002Fkarpathy\u002Fstatus\u002F2039805659525644595) — using LLMs to compile personal notes into a structured, queryable wiki. \nLM Wiki is an attempt to package that workflow into something anyone can use, privately, right inside Obsidian.\n\n---\n\nYour notes already contain a wealth of knowledge — scattered across files, half-connected, hard to query. \nLM Wiki reads your Obsidian vault, extracts the people, ideas & connections, and lets you ask questions in natural language. \n\nTLDR: privately chat with your notes.\nEverything runs locally on your machine. No cloud account required. Your notes never leave your computer. You can also use Anthropic, OpenAI or Gemini if you wish.\n\n![LM Wiki demo — asking questions about your notes](docs\u002Fassets\u002Fhero-demo.gif)\n\n## Quick start\n\nYou need two things: [Ollama](https:\u002F\u002Follama.com) (a free, local LLM runtime) and the plugin itself.\n\n**1. Install Ollama and pull the models**\n\nDownload Ollama from [ollama.com](https:\u002F\u002Follama.com), or install it from the terminal:\n\n```bash\n# Mac\nbrew install ollama\n\n# Linux\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\n```\n\nThen pull the models:\n\n```bash\nollama pull qwen2.5:7b\nollama pull nomic-embed-text\n```\n\nThe first model (`qwen2.5:7b`, ~4.7 GB) reads your notes and answers your questions. The second (`nomic-embed-text`, ~275 MB) powers semantic search — it's what lets the plugin find relevant notes even when you don't use the exact same words.\n\nAs of April 2026, both models are the most reasonable option for an average local setup.\n\n**2. Install the plugin**\n\nYou have two options.\n\n*From the Community Plugins browser (once accepted).* In Obsidian, go to Settings > Community plugins, browse, search for \"LM Wiki\", click Install, then Enable.\n\n*Manual install (works today, before community-store acceptance).* Download these three files from the latest [release](https:\u002F\u002Fgithub.com\u002Fdomleca\u002Fllm-wiki\u002Freleases):\n\n- `main.js`\n- `manifest.json`\n- `styles.css`\n\nPlace them in `\u003Cyour-vault>\u002F.obsidian\u002Fplugins\u002Fllm-wiki-plugin\u002F` — create the folder if it doesn't exist. Then in Obsidian, go to Settings > Community plugins, make sure Community plugins are enabled (turn off Restricted mode if prompted), and toggle **LM Wiki** on. If you don't see it in the list right away, hit the refresh button next to \"Installed plugins\".\n\n\u003C!-- Once accepted in the community directory, users can also install via: obsidian:\u002F\u002Fshow-plugin?id=llm-wiki-plugin -->\n\n**3. Index your knowledge base**\n\nOpen the command palette (`Cmd+P` \u002F `Ctrl+P`) and run **LM Wiki: Run extraction now**. The plugin walks your vault, sends each note to the local model, and builds a structured knowledge base. Progress shows in the status bar.\n\n> **This takes a while.** The first extraction processes every note one by one. On a 600-note vault with a MacBook Air M2 (16 GB) running `qwen2.5:7b` locally, it took about **4 hours**. Larger vaults or older machines will take longer. Good time to start it before bed. If you're on a Mac laptop, keep it awake with `caffeinate` in a terminal:\n>\n> ```bash\n> caffeinate -i\n> ```\n>\n> After the first run, only changed notes are re-extracted — updates take seconds, not hours.\n\n**4. Ask your vault a question**\n\nRun the command **Ask knowledge base** (or click the ribbon icon). Type a question. Answers stream in with clickable links back to the source notes.\n\n> **Tip:** Set a hotkey for quick access. Go to Settings > Hotkeys, search for \"Ask knowledge base\", and assign a shortcut — `Shift+Cmd+K` works well.\n\nThat's it. You're running.\n\n## What it does\n\n- **Extracts knowledge from your notes** — entities (people, organizations, tools, books, places, events), concepts (ideas, theories, frameworks), and 9 types of connections between them.\n- **Answers questions in natural language** — a chat interface grounded in your own writing, with source links so you can verify every answer.\n- **Hybrid search** — combines keyword matching, semantic similarity, and vault structure to find the right context, even when your question uses different words than your notes.\n- **Knows when it doesn't know** — if your vault doesn't have enough on a topic, it says so instead of making things up.\n- **Generates wiki pages** — structured markdown pages for every entity, concept, and source, organized in `wiki\u002F` folders compatible with Obsidian [Bases](https:\u002F\u002Fobsidian.md\u002Fbases).\n- **Keeps up with your writing** — saving a note triggers background re-extraction. Optional nightly full re-index of new items.\n- **Multi-turn conversations** — chats are saved and resumable. Pick up where you left off.\n- **Multiple providers** — Ollama (local, free) by default. OpenAI, Anthropic, and Google available as options in settings.\n\n| | |\n|---|---|\n| ![Query modal](docs\u002Fassets\u002Fquery-modal.png) | ![Chat answer](docs\u002Fassets\u002Fchat-answer.png) |\n| ![Sources](docs\u002Fassets\u002Fchat-sources.png) | ![Settings](docs\u002Fassets\u002Fsettings.png) |\n\n## Commands\n\n| Command | What it does |\n|---|---|\n| Ask knowledge base | Open the chat modal |\n| Run extraction now | Re-index your entire vault |\n| Extract current file | Re-extract only the active note |\n| Cancel running extraction | Stop an in-progress extraction |\n| Regenerate pages from KB | Rebuild all wiki pages |\n| Reload knowledge base from disk | Reload the KB without re-extracting |\n| Show vocabulary | Inspect the raw knowledge base |\n\n## Cloud providers (optional)\n\nThe default setup is fully local — nothing to sign up for, nothing to pay for. If you want to use a cloud model instead (faster, or for larger vaults), go to Settings > LM Wiki, pick a provider, and enter your API key.\n\n| Provider | Chat models | Embedding |\n|---|---|---|\n| Ollama (default) | qwen2.5:7b and others | nomic-embed-text |\n| OpenAI | GPT-4o, GPT-4o mini | text-embedding-3-small |\n| Anthropic | Claude Sonnet, Haiku | uses Ollama fallback |\n| Google | Gemini 2.0 Flash | text-embedding-004 |\n\nCloud providers send note content to the provider's API. If privacy matters, stick with Ollama.\n\n## Your notes, the wiki, and your chats\n\n**Your existing notes are never modified. Everything the plugin generates lives in a single `wiki\u002F` folder.**\n\nLM Wiki keeps three things cleanly separated in your head and on disk:\n\n- **Your notes** — the raw material. Everything you've already written in your vault. LM Wiki reads them but never touches them.\n- **The wiki** — a structured knowledge base built *from* your notes. It lives in a single `wiki\u002F` folder inside your vault and is what queries search against.\n- **Your chats** — the answers LM Wiki gives you. Saved so you can resume conversations, kept apart from both your notes and the wiki.\n\nThe `wiki\u002F` folder looks like this:\n\n```\nwiki\u002F\n  kb.json            knowledge base (the structured data)\n  index.md           catalog page\n  entities\u002F          one page per entity\n  concepts\u002F          one page per concept\n  sources\u002F           one page per source note\n```\n\nBy default, the `wiki\u002F` folder is hidden from search, Quick Switcher, and graph view — it won't clutter your vault or interfere with your links. If you're curious and want to browse the generated pages, you can make them visible in Settings > LM Wiki > Appearance. Either way, your original notes stay exactly as they were.\n\n## How it works\n\nLM Wiki turns your unstructured notes into a structured knowledge base, then uses that structure to answer questions. Here's what happens under the hood:\n\n**Extraction.** When you run extraction, the plugin reads each note in your vault and sends it to an LLM with a prompt like \"what entities, concepts, and connections are in this text?\" The model returns structured data — names, types, descriptions, relationships — which gets merged into a single knowledge base (`wiki\u002Fkb.json`). Think of it as the plugin reading all your notes and building a mental map of everything in them.\n\n**Page generation.** From that knowledge base, the plugin writes one markdown page per entity, concept, and source note into `wiki\u002F` folders. These pages are plain markdown with frontmatter, so they work with Obsidian's Bases feature for filtering and sorting. You get a browsable wiki of your own knowledge, automatically maintained.\n\n**Retrieval.** When you ask a question, the plugin doesn't send your entire vault to the LLM — that would be too slow and too large. Instead, it searches the knowledge base to find the most relevant pieces of context. It uses three strategies in parallel: keyword matching (finding notes that contain the same terms), semantic similarity (finding notes that mean similar things, even with different words — this is what the embedding model does), and vault structure (prioritizing notes in folders you've scoped). The results are merged using a technique called Reciprocal Rank Fusion, which combines multiple ranked lists into one.\n\n**Answering.** The top-ranked context gets bundled into a prompt along with your question and any conversation history, then sent to the LLM. The answer streams back token by token. Afterward, the plugin cross-references the answer against the retrieved sources and shows them as clickable links so you can verify the grounding yourself.\n\n**Keeping up to date.** When you save a note, the plugin re-extracts just that file in the background — no need to re-index the whole vault. There's also an optional nightly scheduler for a full refresh.\n\n## Privacy\n\n- With Ollama (the default), all processing happens on your machine. Nothing is sent anywhere.\n- Cloud providers require sending note content to their APIs. This is opt-in and clearly labeled in settings.\n- No telemetry, analytics, or tracking of any kind.\n\n## Development\n\n```bash\nnpm install\nnpm test           # 476 tests\nnpm run typecheck  # strict TypeScript\nnpm run lint\nnpm run build      # production build\nnpm run dev        # watch mode\n```\n\n## 🛠 Installation\nFrom source\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fdomleca\u002Fllm-wiki\ncd llm-wiki\nnpm install\nnpm run build\n```\n\nThen copy the plugin folder into your Obsidian plugins directory.\n\n## License\n\n[MIT](LICENSE)\n","LM Wiki 是一个基于本地运行的大型语言模型，旨在将个人笔记转化为可查询的知识库。它能够读取Obsidian中的笔记，提取关键人物、概念及其关联，并允许用户以自然语言形式提问。项目使用TypeScript编写，支持完全本地化处理，确保隐私安全，无需云服务账号。此外，LM Wiki兼容Anthropic, OpenAI或Gemini等外部模型。适合需要高效整理和检索大量笔记的研究者、学生及知识工作者使用。通过简单的安装步骤，包括设置Ollama环境与加载所需模型，以及在Obsidian中启用插件，用户即可开始构建自己的个性化知识管理系统。",2,"2026-06-11 02:48:10","CREATED_QUERY"]