npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

llm-wiki

v0.1.3

Published

An LLM-powered personal wiki CLI. Incrementally build and query a persistent, interlinked wiki from your raw sources.

Readme

llm-wiki

npm version License: MIT Node.js Version

An LLM-powered personal wiki CLI. Inspired by Andrej Karpathy's LLM Wiki pattern – instead of re-discovering knowledge from raw documents on every query, this tool incrementally builds and maintains a persistent, interlinked wiki where knowledge is compiled once, kept current, and grows smarter over time.

Traditional RAG:  You ask → AI searches fragments → temporary answer → no accumulation

LLM Wiki:         You add source
                      ↓ wiki ingest
                  LLM permanently integrates into wiki
                      ↓ wiki query
                  Synthesised answer with citations from your own knowledge base

✨ Features

| | Feature | Description | |---|---|---| | 📥 | Smart Ingestion | Add raw material; LLM integrates it into structured wiki pages with citations | | 🔗 | Automatic Linking | Cross-links new knowledge with existing pages | | 🔍 | Multi-Step Retrieval | Iterative ReAct agent that dives into source files for deep answers | | 🩺 | Wiki Lint | Detects orphans, dead links, contradictions, shallow pages, and missing concepts | | 🗂️ | List Tools | Browse raw sources, wiki pages, and backlinks | | 📄 | Zero Lock-in | Pure Markdown; works with Obsidian, VS Code, or any editor | | 🤖 | OpenAI-compatible | Works with OpenAI, Anthropic (via proxy), DeepSeek, Ollama, and any OpenAI-compatible API |


🚀 Installation

Requires Node.js 22+.

npm install -g llm-wiki

Or with pnpm:

pnpm add -g llm-wiki

⚙️ Configuration

Run wiki init inside any directory to scaffold the wiki structure and generate a .wikirc.yaml template:

mkdir my-wiki && cd my-wiki
wiki init

Edit .wikirc.yaml (auto-added to .gitignore to protect your API key):

# LLM Provider Configuration
llm:
  provider: openai
  model: gpt-4o
  apiKey: YOUR_API_KEY_HERE
  baseUrl: https://api.openai.com/v1  # Change for proxies or other providers
  temperature: 0.3
  thinking:
    type: disabled  # Set to 'enabled' for reasoning models (e.g. o1, o3)

Using DeepSeek / other providers:

llm:
  model: deepseek-chat
  apiKey: YOUR_DEEPSEEK_KEY
  baseUrl: https://api.deepseek.com/v1

📁 Directory Structure

After wiki init, your wiki directory will look like:

my-wiki/
├── .wikirc.yaml          ← Config (gitignored)
├── .gitignore
├── raw/
│   ├── untracked/        ← New sources waiting to be ingested
│   │   └── 2026/
│   │       └── 04/
│   │           └── 05-article-name.md
│   └── ingested/         ← Sources that have been processed
│       └── 2026/
│           └── 04/
│               └── 05-article-name.md
└── wiki/
    ├── index.md          ← Auto-maintained wiki index (the brain)
    ├── log.md            ← Operation history
    ├── concepts/         ← LLM-generated concept pages
    ├── sources/          ← Source attribution pages
    └── answers/          ← Saved query answers

📖 Commands

wiki raw

Interactively add a raw source document (articles, notes, conversations, etc.).

wiki raw

You'll be prompted to paste content in your editor, then provide:

  • Source description – e.g. "Claude Code 使用技巧公众号文章" (becomes part of the filename)
  • Content typearticle, conversation, note, book-excerpt, code-snippet, other

The file is saved to raw/untracked/YYYY/MM/DD-source-name.md.


wiki ingest [file]

Process raw source(s) into the wiki using the LLM.

wiki ingest                   # Interactive file picker
wiki ingest --all             # Ingest all pending files
wiki ingest --dry-run         # Preview operations without writing
wiki ingest -y                # Skip confirmation prompts
wiki ingest -d                # Debug mode: print LLM payload and relevant pages found

The LLM will:

  1. Read the raw content and the current wiki/index.md
  2. Find related existing pages automatically (keyword matching)
  3. Propose create / update / delete operations on wiki pages
  4. Update wiki/index.md to link new pages
  5. Move the source file to raw/ingested/ once confirmed

All operations require user confirmation before being applied (unless -y is set).


wiki query [question]

Ask a question based on your wiki using a multi-step ReAct agent.

wiki query "怎么用好Claude Code?"
wiki query -d                  # Debug: show which files the agent reads at each step
wiki query --save              # Auto-save the answer as a wiki page
wiki query --no-save           # Skip the save prompt

The agent works in a loop (up to 4 iterations):

  1. Reads index.md – understands what topics exist
  2. Fetches concept pages – reads the relevant pages
  3. Dives into sources – if a concept page cites [src: raw/ingested/...], the agent reads the original source for deeper detail
  4. Outputs a synthesised answer in the same language as your question, with [src: PageName] citations

Optionally save the answer back into the wiki as wiki/answers/your-title.md.


wiki list <type> [target]

Browse the wiki without LLM costs.

wiki list raw              # Show all untracked + ingested source files
wiki list pages            # List all wiki concept pages
wiki list orphans          # Find pages with no incoming links
wiki list backlinks "Claude Code"   # Find all pages that link to a given page

wiki lint

Run a health check on your wiki.

wiki lint                  # Static analysis + LLM semantic analysis
wiki lint --skip-llm       # Static analysis only (free, instant)
wiki lint --fix            # Auto-apply fix proposals (creates stubs, updates index)

Phase 1 – Static (free):

  • ⚠ Orphan pages (no incoming links)
  • ✗ Dead links ([[Page]] pointing to non-existent files)
  • ⚠ Pages missing from index.md

Phase 2 – LLM semantic (one API call):

  • ✗ Contradictions between pages
  • ⚠ Missing concept stubs (frequently mentioned but no dedicated page)
  • ⚠ Shallow / placeholder pages

--fix mode creates stub pages for missing concepts and updates index.md atomically so no new orphans are created.


🗺️ Roadmap

  • [x] wiki init
  • [x] wiki raw with YAML frontmatter and per-date directory organisation
  • [x] wiki ingest with LLM patch generation and confirmation
  • [x] wiki query with iterative ReAct multi-step retrieval
  • [x] wiki list (raw / pages / orphans / backlinks)
  • [x] wiki lint (static + LLM semantic + auto-fix)
  • [x] Automatic relevant-page discovery during ingest
  • [x] jsonrepair resilience for malformed LLM JSON
  • [x] .wikirc.yaml configuration support
  • [ ] wiki log command
  • [ ] Obsidian plugin integration
  • [ ] Support for embeddings / vector search when index grows large

🙏 Acknowledgements

  • Andrej Karpathy for the LLM Wiki pattern
  • Vannevar Bush for the 1945 Memex vision
  • The Obsidian community for inspiring local, Markdown-based knowledge management

📄 License

MIT