The Problem
Professionals and researchers spend hours re‑reading PDFs, notes, and web clips to answer recurring questions. Each query forces an LLM to re‑process the same raw material, leading to latency, cost, and inconsistent answers. A persistent, inter‑linked knowledge base that the model can reference once and reuse would eliminate this duplication.
What This Does
llmwiki implements Karpathy’s “LLM‑Wiki” pattern as a full‑featured desktop app. Raw documents are ingested by the pipeline in src/lib/ingest.ts, transformed into markdown pages stored under the wiki folder, and linked via [[wikilink]] syntax. The UI—built with React (src/App.tsx and many src/components/ files)—exposes a three‑column layout: file tree, editor, and graph view (src/components/graph/graph-view.tsx). The Tauri bridge (src-tauri/src/main.rs, src-tauri/src/lib.rs) provides native file‑system access, PDF rendering (src-tauri/pdfium/), and a persistent ingest queue (src/lib/ingest-queue.ts). The result is a locally stored, Obsidian‑compatible vault that the LLM can query without re‑reading the original sources.
How To Use It
Setup
Prerequisites Node 18+ (npm or pnpm) Rust toolchain (cargo) – required by Tauri git clone the repo
npm ci # installs the 98 TypeScript packages (package-lock.json) cargo build --release # builds the Rust backend (src-tauri/Cargo.toml) npm run tauri dev # starts the desktop app in development mode
The package.json scripts follow the standard Tauri convention (tauri dev, tauri build).
Configuration
API keys for LLM providers are read from src/lib/llm-providers.ts via environment variables (e.g., OPENAIAPIKEY). The Tauri config (src-tauri/tauri.conf.json) defines the data directory (appDataDir) where the wiki is persisted. No additional config files are required out of the box.
Running
Launch the compiled binary (target/release/llmwiki) or, during development, the npm run tauri dev command opens the UI. Ingest a folder via the “Import” button, which triggers src/lib/auto-save.ts → src/lib/ingest.ts. The graph view updates automatically, reflecting the 4‑signal knowledge graph (src/lib/wiki-graph.ts).
Real‑World Use
A market‑research analyst drops a folder of PDF reports into the app. The ingest pipeline extracts text (src/lib/deep-research.ts), creates linked wiki pages, and runs community detection (src/lib/graph-relevance.ts). Later, the analyst queries the knowledge base; the LLM retrieves relevant pages via vector search (src/lib/vectorstore.ts using LanceDB) and cites sources, cutting research time from hours to minutes.
Code Health & Issues
Tests – High – 50+ Jest/TS tests covering core libs (src/lib//.test.ts) and CI workflow (.github/workflows/ci.yml). CI – High – GitHub Actions build both the React bundle and Rust binary, ensuring cross‑platform reproducibility. License – Low – LICENSE file present (MIT), no hidden restrictions. Dependency Hygiene – Medium – package-lock.json pins JS deps; Rust Cargo.lock does the same, but no automated vulnerability scanning configured. Error Handling – Medium – Ingest queue (src/lib/ingest-queue.ts) includes crash recovery tests, yet runtime UI errors could surface from unvalidated external LLM responses (no explicit schema validation). Security – Low – API keys are expected in environment variables; no secret‑management wrapper is provided, which is typical for desktop tools but worth noting for enterprise use. Documentation – Low – README outlines features but lacks step‑by‑step install instructions; the inferred commands above are based on standard Tauri conventions.
The Bottom Line
llm_wiki delivers a functional, test‑covered desktop implementation of an incremental LLM‑driven knowledge base, suitable for solo researchers or small teams who can manage their own API credentials. The codebase is clean and CI‑validated, though enterprises should add secret management and dependency scanning before production deployment.