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

asljs-kb-cli

v0.1.2

Published

The kb command line over asljs-kb: read, search, write and organise a markdown library.

Readme

kb

Part of Alexandrite Software Library - a set of high-quality, performant JavaScript libraries and tools for everyday use.

Overview

Knowledge base tooling for a markdown library: file and folder operations, full text search, formatting, and structured data extraction, available both as a CLI and as an MCP server. The library in a browser is the kb-srv server of asljs-kb-srv.

Markdown is the base file type. Other file types are supported for the operations that make sense for them; PDF files, for example, take part in text search and can be read through their text layer.

The operations themselves are functions of the kb library. This package is the kb command, a client of the kb-mcp server of asljs-kb-mcp. An application that wants the functions without a command line imports asljs-kb instead.

Installation

npm install asljs-kb-cli

For CLI usage in a project or a notes folder:

npx kb --library ./notes list

Usage

Create a note:

kb new notes/weekly-review --title "Weekly review" --tags team,weekly
notes/weekly-review.md

The note starts with YAML front matter and a level 1 heading:

---
title: Weekly review
created: 2026-01-02T03:04:05.000Z
tags:
  - team
  - weekly
---

# Weekly review

Find where a topic is discussed, across markdown and PDF alike:

kb search budget
handbook.pdf:1:11: Quarterly budget handbook
notes/weekly-review.md:9:5: The budget is approved.

Pull the outline out of a document:

kb extract notes/weekly-review.md --type headings --format text
# Weekly review (line 9)
## Decisions (line 13)

Serve libraries to an MCP client over stdio with kb-mcp of asljs-kb-mcp; each tool takes a project, the path of a library's kb.json or of its folder:

{
  "mcpServers": {
    "kb": {
      "command": "npx",
      "args": ["kb-mcp"]
    }
  }
}

Every command works inside one library root: --library <path>, else KB_LIBRARY, else library of the nearest kb.json, else the current working directory. A path that resolves outside of it is rejected.

Further reading

  • Guide - how a command reaches the library, every command and option, rendering, moving with links, backlinks, the link index, and the MCP server.
  • Requirements - what the CLI guarantees, as rq requirements.

Questions and bugs: asljs/issues.

Related packages

  • kb - the knowledge base functions, as a library.
  • asljs-kb-mcp - the kb-mcp MCP server, and the client the CLI reaches it with.
  • asljs-kb-srv - the kb-srv web server.

License

MIT License. See LICENSE for details.