llm-wiki is a local CLI for building an Obsidian-based knowledge workspace for both human use and AI use.
The project is inspired by Andrej Karpathy's LLM wiki idea:
It also adopts the technical direction the community has largely converged on:
- local markdown files as the source of truth
- Obsidian as the workspace and graph UI
- Claude Code / Claudian as the agent interface
- lightweight local search instead of a custom hosted system
The core idea is simple:
- keep knowledge in local markdown files
- let humans browse and edit it in Obsidian
- let AI agents read, update, ingest, and query it from the same workspace
This means the wiki is not just a note vault. It is also an agent working environment with explicit control files, schema, memory, and query tooling.
After init, you get a single project root that acts as:
- the Obsidian vault root
- the Claude / Claudian working root
- the
llm-wikiinstance root
Expected structure:
my-wiki/
├─ .wiki/
│ ├─ config.yaml
│ ├─ context.md
│ ├─ qmd.yaml
│ └─ schema.md
├─ .obsidian/
│ └─ app.json
├─ .claude/
│ ├─ commands/
│ │ ├─ wiki-ingest.md
│ │ ├─ wiki-query.md
│ │ └─ wiki-lint.md
│ └─ skills/
│ └─ my-wiki/
│ └─ SKILL.md
├─ sources/
│ └─ downloaded/
├─ wiki/
│ ├─ index.md
│ ├─ log.md
│ └─ pages/
│ ├─ concepts/
│ ├─ resources/
│ └─ analyses/
├─ AGENTS.md
└─ CLAUDE.md
You also get:
- a schema-driven wiki layout
- startup instructions for the agent
- persistent working memory in
.wiki/context.md - local query support via
qmd - a structure that works for both humans and AI agents
Preview:
The project root is intentionally the single working root.
Why:
- Obsidian should see the same workspace the agent sees
- Claude / Claudian should read the same control files the human maintains
- the wiki should stay local, inspectable, and editable without special infrastructure
Knowledge content stays under wiki/. Control and environment files stay at the root or under .wiki/ / .claude/.
Minimal path from zero to usable:
mkdir my-wiki
cd my-wiki
node /path/to/llm-wiki/dist/index.js init
node /path/to/llm-wiki/dist/index.js skill install my-wikiThen:
- Open
my-wikiin Obsidian as a vault. - Install Claudian if needed:
https://github.com/YishenTu/claudian - Start using
/wiki-ingest,/wiki-query, and/wiki-lint.
About init:
preflightchecks the local environment before creating the wikiauto fixis offered in interactive mode for automatically repairable issues such asClaude CLI,Claude Login, andqmdsetup guidanceappears only when something is missing and explains what to install or do manuallyinitthen creates the wiki files and directories
For the intended workflow, these tools fit together:
- Obsidian Used as the vault UI, graph view, and human editing workspace.
- Claudian Used inside Obsidian to connect Claude Code into the vault.
- Claude Code CLI Used as the agent runtime.
llm-wikiInitializes the workspace, generates control files, and provides the local wiki workflow commands.qmdProvides optional accelerated local search for markdown content.
In practice, the ideal chain looks like this:
Obsidian -> Claudian -> Claude Code -> llm-wiki -> qmd
Only part of this chain is strictly required to create a wiki. qmd is optional; when it is unavailable, the CLI falls back to local text search.
Main commands:
llm-wiki init
llm-wiki health
llm-wiki repair
llm-wiki list
llm-wiki gc
llm-wiki index
llm-wiki query "<question>" --json
llm-wiki skill install <wiki-name>If llm-wiki is not installed globally, use:
node /path/to/llm-wiki/dist/index.js <command>What each one is for:
init: run environment preflight, then create a new wiki in the current directoryhealth: inspect environment and current wiki statusrepair: regenerate missing wiki metadata files inside an existing wikilist: show wiki instances tracked in the global registrygc: remove missing entries from the global registryindex: build or refresh the local qmd index for the current wikiskill install: install the generated wiki skill into a Claude Code scopequery: query the wiki throughqmd, with automatic fallback when embeddings are unavailable
Environment notes:
- Node.js 20+
@tobilu/qmd(optional)- Obsidian
- Claudian
- Claude Code CLI
Cross-platform notes:
- primary validation targets are Windows and macOS
Claude Loginis detected viaclaude auth statusfirst, which covers macOS Keychain-backed authqmdresolution checks PATH,npm root -g, and common global install locations- this repo pins npm to the official registry through
.npmrc - for manual
qmdinstallation, prefernpm install -g @tobilu/qmd --registry=https://registry.npmjs.org/
Current search behavior:
qmdis used when available- if
qmdis missing, the CLI falls back to local text search - if
qmdembedding fails, the CLI falls back to local text search - on Windows, GPU/CUDA embedding may be unstable depending on the local
qmd/node-llama-cppstack - GPU embedding should be treated as optional acceleration, not a hard requirement
The mainline MVP is complete. Current follow-up work is mainly:
- optional key-image sync during URL ingest
- making Windows GPU embedding an explicit optional enhancement
- improving the
gc,repair, andlintworkflow and skill experience - adding a lightweight way for users inside Claudian to record
llm-wikiTODOs against the localllm-wikirepo for continued iteration - validating that a wiki skill can be installed and used reliably across different models and Claude Code sessions
MIT
