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

@iannuttall/librarian

v0.1.5

Published

Local-first docs CLI

Readme

Librarian

Librarian fetches and searches up-to-date developer docs on your machine.
Use it to give AI agents real context so they stop guessing and writing bad code.

Supports GitHub repos and public websites.

Install

npm

npm i -g @iannuttall/librarian
librarian setup

bun

bun add -g @iannuttall/librarian
librarian setup

Note: npm installs still require Bun at runtime; the CLI will prompt you to install it if missing.

Install Bun (optional):

curl -fsSL https://bun.sh/install | bash

Updates

Check your current version

librarian version

Update (auto-detects bun vs npm)

librarian update

Librarian also checks for updates once per day when you run any command and will suggest the right update command.

Quick start (from repo)

bun install
bun setup

If you choose the global install during setup, use librarian below.
Otherwise use ./librarian.

librarian add https://github.com/honojs/website --docs docs
librarian add https://hono.dev/docs
librarian ingest --embed
librarian library "honojs"
librarian search --library honojs/website "middleware"

Sources

GitHub repos

librarian add https://github.com/owner/repo --docs docs --ref main
librarian add https://github.com/owner/repo --version 16.x

Websites

Basic - auto-discovers via llms.txt, sitemap.xml, robots.txt

librarian add https://docs.example.com

With options

librarian add https://docs.example.com/api --depth 3 --pages 500

Specific paths

librarian add https://example.com --allow /docs,/api --deny /blog

Ingest

Ingest all sources

librarian ingest

Ingest with concurrency (default: 5)

librarian ingest --concurrency 10

Force re-ingest

librarian ingest --force

Ingest and embed

librarian ingest --embed

Seed sources

Add the built-in seed list and auto-ingest

librarian seed

The default seed list lives in data/libraries.yml in this repo.

Search

Hybrid search (word + meaning)

librarian search --library vercel/next.js "middleware"

Word search only

librarian search --library vercel/next.js --mode word "middleware"

Meaning search only

librarian search --library vercel/next.js --mode vector "middleware"

JSON output

librarian search --library vercel/next.js --json "middleware"

Filter by version

librarian search --library vercel/next.js --version 16.x "middleware"

To avoid mixed results, scope searches to a library version label. If you are in a repo, run:

librarian detect

Then pass the label to search. If you are not in a repo, run a library search first: librarian library "<name>" to see the available version labels.

Library search

Find a library and list versions

librarian library "nextjs"

Other commands

List sources

librarian source list

Remove source

librarian source remove 1

Add sources from the seed list

librarian seed

Read a doc

librarian get --library vercel/next.js docs/guide.md

Read a slice

librarian get --library vercel/next.js --doc 69 --slice 19:73

Show counts

librarian status

Detect versions in cwd

librarian detect

Update Librarian

librarian update

Remove inactive docs

librarian cleanup

MCP server

Start the MCP server (stdio)

librarian mcp

Tools:

  • search (use mode for word/vector/hybrid)
  • library
  • get

Configuration

Config file: ~/.config/librarian/config.yml

github:
  token: ghp_xxx  # For private repos

proxy:
  endpoint: http://user:[email protected]:8080
  # Any HTTP proxy works; tested with Webshare.

headless:
  enabled: true
  proxy: http://proxy.example.com:9999  # IP-whitelisted, no auth
  chromePath: /path/to/chrome  # Optional, auto-detected

crawl:
  concurrency: 5

ingest:
  maxMajorVersions: 3

Notes

  • setup downloads the local embedding model
  • Public repos don't need a GitHub token
  • Website crawling auto-detects CSR/SPA sites and uses headless Chrome
  • Chrome is auto-detected but can be configured manually
  • Run librarian setup to check Chrome availability
  • If librarian does not work in a repo checkout, use ./librarian
  • More examples in docs/usage.md

Agent skills

Skills use progressive disclosure, so only the skill name and description load at startup.

Codex

  • Copy the bundled skill to your Codex skills folder:
mkdir -p ~/.codex/skills
cp -R skills/librarian ~/.codex/skills/librarian
  • Direct invocation works in Codex CLI: use $librarian or /skills
  • Codex web and iOS do not support direct invocation yet, so just ask to use the librarian skill

Claude Code

  • Copy the skill to your Claude Code skills folder:
mkdir -p ~/.claude/skills
cp -R skills/librarian ~/.claude/skills/librarian

Factory

  • Copy the skill to your Factory skills folder:
mkdir -p ~/.factory/skills
cp -R skills/librarian ~/.factory/skills/librarian