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/           ← markdown vault with [[wikilinks]]
  cache/           ← SHA256 cache (skip unchanged files)

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

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.4.0.tar.gz (70.5 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.4.0-py3-none-any.whl (88.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: my_llm_wiki-0.4.0.tar.gz
  • Upload date:
  • Size: 70.5 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.4.0.tar.gz
Algorithm Hash digest
SHA256 e50c99210e4e37506c0ddf6bd31b785e704f01c9d21fda5fe622fbe2dfed9d28
MD5 f436095bfb1848f4cf1d82745125f8bd
BLAKE2b-256 70b7491e7dad70194d3724a71e1d9116d48ecc9edb1eb775e47e88947de100a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: my_llm_wiki-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 88.0 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eee6c696f066418a9b276ec36144e052e99f02ac195742c4a436a6c28aa0c4fe
MD5 22997b3102d04cdddefd715cb18a98a3
BLAKE2b-256 602495713dad05b86f543819ad6914ba0e204d55ac7c23cf91cb94c94ee9dfa3

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