Metadata-Version: 2.4
Name: my-llm-wiki
Version: 0.9.0
Summary: Turn any folder into a queryable knowledge graph. Inspired by Andrej Karpathy's LLM Wiki concept.
Author: phuc-nt
License-Expression: MIT
Project-URL: Homepage, https://github.com/phuc-nt/my-llm-wiki
Project-URL: Repository, https://github.com/phuc-nt/my-llm-wiki
Project-URL: Issues, https://github.com/phuc-nt/my-llm-wiki/issues
Keywords: knowledge-graph,wiki,ast,tree-sitter,llm-wiki,markdown
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx
Requires-Dist: tree-sitter
Requires-Dist: tree-sitter-python
Requires-Dist: tree-sitter-javascript
Requires-Dist: tree-sitter-typescript
Requires-Dist: tree-sitter-go
Requires-Dist: tree-sitter-rust
Requires-Dist: tree-sitter-java
Requires-Dist: tree-sitter-c
Requires-Dist: tree-sitter-cpp
Requires-Dist: tree-sitter-ruby
Requires-Dist: tree-sitter-c-sharp
Requires-Dist: tree-sitter-kotlin
Requires-Dist: tree-sitter-scala
Requires-Dist: tree-sitter-php
Requires-Dist: tree-sitter-swift
Requires-Dist: tree-sitter-lua
Requires-Dist: tree-sitter-zig
Requires-Dist: tree-sitter-powershell
Requires-Dist: tree-sitter-elixir
Provides-Extra: pdf
Requires-Dist: pypdf>=4.0; extra == "pdf"
Requires-Dist: html2text; extra == "pdf"
Provides-Extra: leiden
Requires-Dist: graspologic; extra == "leiden"
Provides-Extra: office
Requires-Dist: python-docx>=1.0; extra == "office"
Requires-Dist: openpyxl>=3.1; extra == "office"
Provides-Extra: docling
Requires-Dist: docling>=2.72; extra == "docling"
Provides-Extra: all
Requires-Dist: pypdf>=4.0; extra == "all"
Requires-Dist: html2text; extra == "all"
Requires-Dist: graspologic; extra == "all"
Requires-Dist: python-docx>=1.0; extra == "all"
Requires-Dist: openpyxl>=3.1; extra == "all"
Requires-Dist: docling>=2.72; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: reportlab>=4.0; extra == "dev"
Dynamic: license-file

<p align="center">
  <img src="assets/logo.svg" width="120" alt="my-llm-wiki logo" />
</p>

<h1 align="center">my-llm-wiki</h1>

<p align="center">
  Drop any files into a folder. Get a living, queryable knowledge graph.
</p>

<p align="center">
  <a href="https://pypi.org/project/my-llm-wiki/"><img src="https://img.shields.io/pypi/v/my-llm-wiki" alt="PyPI"></a>
  <a href="https://github.com/phuc-nt/my-llm-wiki/actions/workflows/test.yml"><img src="https://github.com/phuc-nt/my-llm-wiki/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
  <a href="https://phuc-nt.github.io/my-llm-wiki/">Documentation</a> ·
  <a href="https://github.com/phuc-nt/my-llm-wiki/issues">Issues</a>
</p>

---

In April 2026, Andrej Karpathy [shared a concept](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) 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.

```bash
pip install my-llm-wiki
cd your-project && llm-wiki .
```

The output `wiki-out/vault/` is a drop-in Obsidian vault — open it directly, or query from CLI. Re-run anytime; SHA256 cache skips unchanged files. `llm-wiki note "<insight>"` writes back from your Claude Code sessions so the graph compounds over time.

### Supported file types

- **Code (19 languages)** — Python, TypeScript/JavaScript, Go, Rust, Java, C/C++, Ruby, C#, and more ([full list](https://phuc-nt.github.io/my-llm-wiki/quick-start.html#supported-languages)). Tree-sitter AST: classes, functions, typed `extends`/`implements`, function signatures, doc comments (Javadoc / JSDoc / GoDoc / `///`), call graph.
- **Markdown / text** — headings, definitions, `[[wikilinks]]`, cross-document references.
- **PDF / DOCX / PPTX / HTML / EPUB** — layout-aware extraction via [Docling](https://github.com/docling-project/docling) (`pip install 'my-llm-wiki[docling]'`). Headings + tables preserved. Scanned PDFs auto-OCR. EPUB unpacked via stdlib zipfile and routed through Docling's HTML pipeline. Bold-as-heading fallback for documents without Word Heading styles.
- **Images (HEIC / PNG / JPG)** — hub nodes from structural pass; vision OCR via Claude Code agent mode (`/wiki .`).

### Read the docs

The full story lives at **[phuc-nt.github.io/my-llm-wiki](https://phuc-nt.github.io/my-llm-wiki/)**:

- **[How It's Built](https://phuc-nt.github.io/my-llm-wiki/why.html)** — narrative: Karpathy's vision → three layers → the living wiki cycle
- **[Install & Quick Start](https://phuc-nt.github.io/my-llm-wiki/quick-start.html)** — first graph in 30 seconds
- **[Core Features](https://phuc-nt.github.io/my-llm-wiki/core-features.html)** — two-pass extraction, typed inheritance, doc comments, communities, write-back
- **[How It Works](https://phuc-nt.github.io/my-llm-wiki/how-it-works.html)** — pipeline internals
- **[Use Cases](https://phuc-nt.github.io/my-llm-wiki/use-cases.html)** — codebases, research notes, mixed knowledge

### License

[MIT](LICENSE)
