Turn any folder into a queryable knowledge graph. Inspired by Andrej Karpathy's LLM Wiki concept.
Project description
my-llm-wiki
Drop any files into a folder. Get a living, queryable knowledge graph.
In April 2026, Andrej Karpathy shared a concept he called LLM Wiki — a personal knowledge system with three layers: raw files (never modified), a compiled wiki with cross-references, and a schema that tells the LLM how to maintain it. The key insight: compile once, query forever, and let the wiki grow with every session as a "persistent, compounding artifact" rather than re-deriving knowledge on every query.
my-llm-wiki implements all three layers. See How It's Built for the full narrative on how Karpathy's vision is realized.
pip install my-llm-wiki
cd your-project && llm-wiki .
The Living Wiki
One command builds the graph. The living wiki cycle keeps it growing over time — each session adds knowledge, insights get filed back, the graph compounds.
┌──────────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Monitor │───▶│ Rebuild │───▶│ Lint │ │
│ │ (watch) │ │ (cached) │ │ (health) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Report │◀─────────────────│Write-back│ │
│ │ (stats) │ │(insights)│ │
│ └──────────┘ └──────────┘ │
│ │
└──────────────────────────────────────────────────┘
Two passes extract knowledge from any file type:
| Pass | What | Cost |
|---|---|---|
| Structural | AST (18 languages): classes, functions, typed extends/implements edges, function signatures, doc comments (Javadoc/JSDoc/GoDoc), call graph, headings, cross-ref |
Free |
| Semantic | Claude Code agents read DOCX, scanned PDFs, images with vision | Claude tokens |
Output goes to wiki-out/:
wiki-out/
graph.html ← interactive graph (vis.js)
graph.json ← persistent graph data
WIKI_REPORT.md ← god nodes, surprising connections
wiki/ ← Wikipedia-style articles
vault/ ← Obsidian-compatible vault ([[wikilinks]] + YAML frontmatter)
cache/ ← SHA256 cache (skip unchanged files)
Obsidian integration
wiki-out/vault/ is a drop-in Obsidian vault. Open it directly, or symlink into an existing vault:
llm-wiki .
# Obsidian → Open folder as vault → wiki-out/vault/
You get: graph view (force-directed), backlinks, tag pane, full-text search, and Properties view (Obsidian 1.4+ reads the YAML frontmatter on each node). Community colors are pre-configured via .vault/graph.json. Use llm-wiki query from CLI for typed-edge details (Obsidian wikilinks are untyped, so extends/implements/calls collapse to generic links in the Obsidian graph view).
CLI
llm-wiki . # build graph
llm-wiki query gods # most connected nodes
llm-wiki query search <term> # keyword search
llm-wiki query path <A> <B> # shortest path
llm-wiki lint # graph health check
llm-wiki watch . # auto-rebuild on changes
llm-wiki add <url> # ingest URL
llm-wiki note "<insight>" # write-back from LLM session
Claude Code Skill
mkdir -p ~/.claude/skills/my-llm-wiki
cp "$(python -c 'import my_llm_wiki; print(my_llm_wiki.__path__[0])')/SKILL.md" ~/.claude/skills/my-llm-wiki/
Then /wiki . in Claude Code — structural extraction + agent-mode semantic extraction for DOCX, scanned PDFs, images.
Docs
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file my_llm_wiki-0.5.1.tar.gz.
File metadata
- Download URL: my_llm_wiki-0.5.1.tar.gz
- Upload date:
- Size: 74.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45253702b57f744bf03a835d0187815633e7a52d11073ce38ee7e383a1cf1f39
|
|
| MD5 |
347a28e64b84bee63f95b1bde5afbcbe
|
|
| BLAKE2b-256 |
1dae35397578484604eaa88021844eed8e5ca32a842e36b60839094537d39787
|
File details
Details for the file my_llm_wiki-0.5.1-py3-none-any.whl.
File metadata
- Download URL: my_llm_wiki-0.5.1-py3-none-any.whl
- Upload date:
- Size: 92.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a02a1ea8211ffbd95c6914cf11979e49cfaf1ae64d7da28b3a4aceda16b3cb
|
|
| MD5 |
a0af630ab58e198289ea4f14429753cc
|
|
| BLAKE2b-256 |
a96f9e994f28aadeece8fbf1b44d114d89ca5f739afe10936dd41a9571d19f6c
|