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

lumen-kb

v0.2.0

Published

Local-first knowledge compiler — ingest articles, papers, PDFs, YouTube into a knowledge graph with hybrid search and MCP server

Downloads

191

Readme

lumen-kb

Local-first knowledge compiler. Ingest articles, papers, PDFs, YouTube transcripts, code repositories, datasets (CSV / JSONL / HuggingFace), images with OCR, and Obsidian vault clippings into a searchable knowledge graph — then wire it into Claude Code, Cursor, or any MCP client. Now with opt-in end-to-end-encrypted cross-device sync so your knowledge base follows you across laptops.

Install

npm install -g lumen-kb

Quick start

# Set up
lumen init
echo 'ANTHROPIC_API_KEY=sk-ant-...' > ~/.lumen/.env

# Ingest
lumen add https://karpathy.medium.com/software-2-0-a64152b37c35
lumen add ./papers/attention.pdf
lumen add https://www.youtube.com/watch?v=kCc8FmEb1nY
lumen add 1706.03762                                      # arXiv by ID
lumen add https://github.com/anthropics/claude-code       # whole code repo
lumen add ./data/results.csv                              # dataset
lumen add ./diagrams/architecture.png                     # image (OCR)
lumen watch add obsidian ~/ObsidianVault                  # auto-pull clippings

# Compile into knowledge graph
lumen compile -c 3

# Search (local, no LLM)
lumen search "attention mechanism" -b 4000

# Ask (LLM-synthesized, streaming)
lumen ask "How does self-attention work?"

Wire into Claude Code

lumen install claude

One command. Generates CLAUDE.md (brain-first protocol), .mcp.json, hooks, and a skill file. Claude checks your knowledge base before answering and captures new ideas after every response.

MCP server

lumen --mcp    # 23 tools via stdio
{ "mcpServers": { "lumen": { "command": "lumen", "args": ["--mcp"] } } }

Tools: brain_ops, search, query, concept, add_link, links, backlinks, god_nodes, pagerank, path, neighbors, communities, community, add, compile, capture, session_summary, brain_feedback, retire_skill, capture_trajectory, replay_skill, status, profile.

Cross-device sync (v0.2.0)

Opt-in, end-to-end-encrypted sync across your laptops. Every concept-touching mutation lands in an append-only journal, gets sealed with X25519 + XChaCha20-Poly1305 on-device, and pushes to a self-hostable Cloudflare Worker relay. The relay holds opaque ciphertext only — it never sees your master key or your concepts.

# On device A (the seeder):
lumen sync init --relay https://lumen-relay.<your-account>.workers.dev
lumen sync enable
lumen sync show-key --reveal           # copy this key into a password manager

# On device B (and C, D, …):
lumen sync import-key "<base64 key>" --relay <same URL>
lumen sync enable
lumen sync run                          # push, pull, apply in one cycle

The reference relay is a ~600-LOC Cloudflare Worker shipped under apps/relay/ in the GitHub repo — deployable in three wrangler commands.

What syncs: concept creations, compiled-truth updates, +1/-1 feedback, retirements, and replayable trajectories. What doesn't: source files (lumen add content), embeddings, raw chunks — those stay local-first.

Commands

| Command | What it does | LLM | | ---------------- | ------------------------------------------------------------------------------------- | --- | | init | Create ~/.lumen workspace | | | add <input> | Ingest URL, PDF, YouTube, arXiv, file, folder, code repo, dataset, image | | | watch | Manage auto-ingest connectors (folder, rss, arxiv, github, obsidian, youtube-channel) | | | compile | Extract concepts + edges via LLM | yes | | search <query> | Hybrid BM25 + TF-IDF + vector search | | | ask <question> | Streamed LLM answer from your sources | yes | | enrich | Auto-escalate concept tiers via LLM | yes | | embed | Generate vector embeddings | API | | graph <sub> | pagerank, path, neighbors, report, export | | | sync <sub> | E2E-encrypted cross-device sync — init, enable, push, pull, apply, run, status | | | profile | Corpus summary | | | status | DB statistics | | | install claude | Wire into Claude Code | | | install codex | Wire into Codex | |

Sync subcommands: init [--relay <url>], enable/disable, push/pull/apply/run, status, reset-error, show-key [--reveal], import-key <base64>, forget-key.

How it works

  1. Ingest — extract content from any source (articles, papers, video transcripts, code repos, datasets, images, Obsidian clippings), chunk structurally, deduplicate via SHA-256, index with FTS5
  2. Compile — LLM extracts concepts + weighted edges, builds compiled truth + timeline per concept
  3. Search — BM25 + TF-IDF + vector ANN fused via Reciprocal Rank Fusion, budget-cut by relevance density
  4. Enrich — concepts auto-escalate from stub (Tier 3) to full knowledge page (Tier 1) as evidence grows
  5. Agent loopbrain_ops checks the KB before answering, capture persists new ideas after responding
  6. Sync — opt-in journal of concept-touching mutations, sealed with X25519 + XChaCha20-Poly1305, pushed to a zero-knowledge Cloudflare Worker relay

Storage

Everything in ~/.lumen/lumen.db — one SQLite file. Back it up and you have everything.

Providers

  • LLM: Anthropic (Claude), OpenRouter, Ollama
  • Embeddings: OpenAI, Ollama
  • Default model: claude-sonnet-4-6

Links