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

lorebook

v0.2.0

Published

Local-first temporal knowledge graph MCP server. No Docker, no accounts, no API keys.

Readme

lorebook

A local-first temporal knowledge graph for your AI agents, as an MCP server. No Docker. No accounts. No API keys. One command.

npx lorebook --dir ~/my-kb     # or: bunx lorebook --dir ~/my-kb

Lorebook is an answer to Graphiti/Zep for personal use: your agents save facts with validity intervals ("main-pc has an ultrawide — since March"), search them with hybrid semantic + keyword retrieval, and supersede them when the world changes — all stored as plain text you can grep, diff, and sync with git. Embeddings run on-device (a ~33MB ONNX model, downloaded once and cached in ~/.cache/lore/models — set LORE_MODEL_CACHE to relocate it).

Register with your harness

Claude Code: claude mcp add lorebook -- npx lorebook --dir ~/my-kb (Codex / Gemini CLI / OpenCode: add the same stdio command to their MCP config.)

60-second tour

  1. npx lorebook init --dir ~/my-kb
  2. Ask your agent to remember something: it calls kb_save with the episode and its extracted facts.
  3. Ask about it tomorrow: kb_search returns compact, cited facts — live ones first, superseded ones on request, point-in-time with as_of.

Graph viewer

lorebook ui --dir ~/my-kb        # opens http://127.0.0.1:7777
lorebook ui --dir ~/my-kb --open # ...and launches your browser

An animated, read-only force-graph of the knowledge base — served locally, fully offline, zero dependencies. Entities are circles sized by how many live facts touch them; click one to expand its neighbors and see its card. The as_of scrubber replays the graph through time: superseded facts dim, retracted ones disappear. Binds 127.0.0.1 only. Change the port with --port or $LORE_UI_PORT.

Agent rules

Copy the ready-made rules block from docs/rules-snippet.md into your AI rules file. It covers: search before assuming, durable-facts test, entity reuse, predicate vocabulary, immediate conflict resolution, and kb_doctor on request.

Performance

Measured on a local Linux machine with the stub embedder (384-dim, hash-based):

| Corpus size | Index time | p50 search | p95 search | |-------------|-----------|-----------|-----------| | 50k facts + 2k entities + 5k episodes | ~5.4s | 38.7ms | 66.5ms |

Budget: p95 < 500ms at 50k facts. Benchmark asserts this in CI (bun scripts/bench.ts --assert). Real-model numbers are similar (embedding is cached after first run).

Troubleshooting

  • First call is slow / "downloading" appears to hang — the ONNX model (~33MB) downloads on first use, then is cached in ~/.cache/lore/models. Subsequent runs are fast. Don't interrupt the first run.
  • Search says "keyword-only mode" — the embedder failed to load (no network on first download, or a corrupt cache). Delete ~/.cache/lore/models and run any command again to re-download cleanly.
  • Check the versionlorebook --version. See all commands with lorebook --help.

Status

Published on npm as lorebook. Feature-complete (M1–M4): store, hybrid search, temporal filters, graph expansion, entity cards, timelines, conflict detection, kb_resolve, kb_doctor. CI: Linux+macOS × Bun+Node.