| 1 | # SwarmVault |
| 2 | |
| 3 | <!-- readme-language-nav:start --> |
| 4 | **Languages:** [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) |
| 5 | <!-- readme-language-nav:end --> |
| 6 | |
| 7 | [](https://www.npmjs.com/package/@swarmvaultai/cli) |
| 8 | [](https://www.npmjs.com/package/@swarmvaultai/cli) |
| 9 | [](https://github.com/swarmclawai/swarmvault) |
| 10 | [](LICENSE) |
| 11 | []() |
| 12 | |
| 13 | **The local-first LLM Wiki, knowledge graph builder, and RAG knowledge base for AI agents.** SwarmVault turns docs, code, transcripts, notes, and URLs into a durable markdown wiki plus a local graph you can inspect, query, and hand to agents. Start with one command, then learn the deeper graph, review, context-pack, and automation workflows when you need them. |
| 14 | |
| 15 | Documentation on the website is currently English-first. If wording drifts between translations, [README.md](README.md) is the canonical source. |
| 16 | |
| 17 | <!-- readme-section:try-it --> |
| 18 | ## Try It in 30 Seconds |
| 19 | |
| 20 | ```bash |
| 21 | npm install -g @swarmvaultai/cli |
| 22 | swarmvault quickstart ./your-repo |
| 23 | ``` |
| 24 | |
| 25 | `quickstart` initializes a vault in the current directory, ingests a local file, directory, or public GitHub repo, compiles the wiki and graph, writes share artifacts, and opens the local graph viewer. It is the beginner-friendly alias for `swarmvault scan`. |
| 26 | |
| 27 | No repo handy? |
| 28 | |
| 29 | ```bash |
| 30 | swarmvault demo |
| 31 | ``` |
| 32 | |
| 33 | After your first compile, the most useful next commands are: |
| 34 | |
| 35 | ```bash |
| 36 | swarmvault next |
| 37 | swarmvault query "What are the key concepts?" |
| 38 | swarmvault graph serve |
| 39 | swarmvault doctor |
| 40 | swarmvault candidate list |
| 41 | ``` |
| 42 | |
| 43 | Not sure what state the vault is in? `swarmvault next` is read-only and tells you whether to initialize, ingest, compile, query, review, or refresh. |
| 44 | |
| 45 |  |
| 46 | |
| 47 | No API keys are required for the first run. The built-in heuristic provider runs locally and offline. |
| 48 | |
| 49 | **What you get on disk:** |
| 50 | |
| 51 | - `raw/` - immutable copies of ingested material |
| 52 | - `wiki/` - generated markdown pages, saved outputs, graph reports, context packs, and task notes |
| 53 | - `state/graph.json` - the machine-readable knowledge graph |
| 54 | - `state/retrieval/` - local search index |
| 55 | - `wiki/graph/share-card.md`, `wiki/graph/share-card.svg`, and `wiki/graph/share-kit/` - copyable and visual first-run summaries |
| 56 | |
| 57 | ### Three-Layer Architecture |
| 58 | |
| 59 | SwarmVault uses three layers, following the pattern described by Andrej Karpathy: |
| 60 | |
| 61 | 1. **Raw sources** (`raw/`) — your curated collection of source documents. Books, articles, papers, transcripts, code, images, datasets. These are immutable: SwarmVault reads from them but never modifies them. |
| 62 | 2. **The wiki** (`wiki/`) — LLM-generated and human-authored markdown. Source summaries, entity pages, concept pages, cross-references, dashboards, and outputs. The wiki is the persistent, compounding artifact. |
| 63 | 3. **The schema** (`swarmvault.schema.md`) — defines how the wiki is structured, what conventions to follow, and what matters in your domain. You and the LLM co-evolve this over time. |
| 64 | |
| 65 | > In the tradition of Vannevar Bush's Memex (1945) — a personal, curated knowledge store with associative trails between documents — SwarmVault treats the connections between sources as valuable as the sources themselves. The part Bush couldn't solve was who does the maintenance. The LLM handles that. |
| 66 | |
| 67 | Turn books, articles, notes, transcripts, mail exports, calendars, datasets, slide decks, screenshots, URLs, and code into a persistent knowledge vault with a knowledge graph, local search, dashboards, and reviewable artifacts that stay on disk. Use it for **personal knowledge management**, **research deep-dives**, **book companions**, **code documentation**, **business intelligence**, or any domain where you acc |