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              # core: code + markdown
pip install 'my-llm-wiki[docling]'   # + layout-aware PDF/DOCX/PPTX/HTML/EPUB extraction
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. Layout-aware extraction for PDF/DOCX/PPTX/HTML/EPUB via Docling, with OCR fallback for scanned PDFs and bold-as-heading fallback for documents without heading styles. Free
Semantic Claude Code agents read images with vision; deeper synthesis on any file 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.8.0.tar.gz (90.1 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.8.0-py3-none-any.whl (99.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: my_llm_wiki-0.8.0.tar.gz
  • Upload date:
  • Size: 90.1 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.8.0.tar.gz
Algorithm Hash digest
SHA256 a4b8bd2646f09164ebd3e106c73dd3d19ae2e4ad5f9925de9f8dd29dca30d5a1
MD5 cb80531eba78429b7b8ad5df280b46bc
BLAKE2b-256 9d362488793221b8ce1f5b5b85d0852f913f9e6d82a155081b288c065ea76a2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: my_llm_wiki-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 99.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.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a37840a53969745b60f3ffe7135b3edf4741097a22f05f8bebe0f914213bee9
MD5 7eb46d58bbf8729c91b386efef30ebc3
BLAKE2b-256 4c0266d818a3d44383842fa5d6d2b0bdfcab427aced7393613126ab5a0f14322

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