Skip to main content

Turn any folder into a queryable knowledge graph. Inspired by Andrej Karpathy's LLM Wiki concept.

Project description

my-llm-wiki logo

my-llm-wiki

Drop any files into a folder. Get a living, queryable knowledge graph.

PyPI Documentation · Issues


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 vault — index.md catalog + [[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).

Node notes are organized into code/, document/, paper/, image/, note/, and other/ subfolders so the vault stays navigable as it grows. Community summaries live in communities/. Wikilinks remain basename-only — Obsidian resolves them across the vault regardless of folder.

vault/index.md is the entry point — content catalog grouped by file type with a Communities section. LLMs (and humans) read it first to navigate the vault before drilling into specific notes.

vault/log.md is the append-only activity log — chronological record of every build and note write-back. Grep-friendly format for auditing how the wiki has grown over time.

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

phuc-nt.github.io/my-llm-wiki

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_llm_wiki-0.6.0.tar.gz (79.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_llm_wiki-0.6.0-py3-none-any.whl (94.5 kB view details)

Uploaded Python 3

File details

Details for the file my_llm_wiki-0.6.0.tar.gz.

File metadata

  • Download URL: my_llm_wiki-0.6.0.tar.gz
  • Upload date:
  • Size: 79.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for my_llm_wiki-0.6.0.tar.gz
Algorithm Hash digest
SHA256 245a05e2a4a11f20b899f03a13460e49c4105e35072ddf8cb71039226468c987
MD5 ac7e0631075ad2eff02d18e80d9ad7cd
BLAKE2b-256 bf160c978800c4fb4b9ea700a6730563cf0f6c4aecd92e54fa3e192717ef8527

See more details on using hashes here.

File details

Details for the file my_llm_wiki-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: my_llm_wiki-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 94.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for my_llm_wiki-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77169022d37786629a5faa71b5d2e8368541ef6edcd1f8c15c36a500b11685e5
MD5 fad6ab5801941601ccce353e8bd59582
BLAKE2b-256 58dee268a1f73a0f2299b028b8136b09608ec001ecb00f7f338a90cac966cdf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page