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

@inventarch/kb

v3.7.0

Published

Use `@inventarch/kb` to read admitted IA records and their bound Markdown/text documents, search them, follow native relationships, and export a selected committed slice. The existing `ia kb` CLI and five `ia_kb_*` MCP tools expose the same read contract.

Readme

Reusable knowledge foundation

Use @inventarch/kb to read admitted IA records and their bound Markdown/text documents, search them, follow native relationships, and export a selected committed slice. The existing ia kb CLI and five ia_kb_* MCP tools expose the same read contract.

Repositories author native records under .ia/src. Canonical documents stay at their ordinary paths. Local reads need no extra directory or manifest. An optional .ia/knowledge.json limits the local selection:

{"format":"ia.kb.selection.v1","sourceId":"example","records":["work-system/contract/spec/architecture"],"resources":["docs/architecture.md"]}

Export requires an explicit selection file in the requested commit:

ia kb search "design decision" --root . --json
ia kb read work-system/contract/spec/architecture --root . --json
ia kb pack --root . --commit FULL_COMMIT_SHA --selection .ia/knowledge.json --out knowledge.json --json
ia kb pack --root . --commit FULL_COMMIT_SHA --selection .ia/knowledge.json --out knowledge.json --apply --yes --json

The first pack command previews. The second exclusively creates the output. Both read the selector and selected bytes from Git. Outputs are bounded JSON packages, not database files. No .kb directory or persistent index is created.

import { captureKnowledge, openKnowledgeView } from '@inventarch/kb';
const view = openKnowledgeView(captureKnowledge(repository));
try {
  const results = view.search('design decision');
  const body = view.read('work-system/contract/spec/architecture');
} finally {
  view.close();
}

Local citations identify the captured working-tree bytes. A later read refuses an old citation if those bytes are unavailable. Package citations retain commit and package coordinates. Neither citation proves publisher identity, approval, or certification.

Hosts construct a foundation from verified retained installation evidence with createFoundation({ installation }), or from an existing verified native installation with foundationFromWorkspace(root). Imported packages cannot select the trusted foundation. The native parser, admission, graph and resource owners validate the package independently.

The ./legacy entrypoint retains the iakb.portable.v1 format, bounded decoder/writer and validation hashes. createLegacyFoundation is a trusted historical-profile adapter: hosts verify the retained installation and select the retained profile separately. Do not calculate historical pins from an expanded current npm dependency inventory. Historical same-content shadow behavior remains isolated to the legacy reader; new packages reject foundation identity shadowing.

A central service stores immutable packages alongside its own audience, lifecycle, revision and recovery state. It authorizes before constructing a library view. Keep stores for different foundation pins separately configured. The library supplies no tenancy policy, publication, approval, synchronization, automatic foreign graph resolution or external URL fetch.

Local capture counts native files containing selected authored records and their bound documents toward the same 100-file limit. A capture without a selection refuses past 5,000 records. Large workspaces can narrow with an explicit selection in .ia/knowledge.json. A selection lists at most 5,000 records and 100 resources in at most 512 KiB of JSON. Individual files are limited to 1 MiB and the combined capture to 8 MiB. A record whose body falls past the file or byte limit is reported unavailable and is not served; capturing a whole selection instead refuses when a resource it lists was not read. Door scopes admit at most 5,000 selectable authored records and 20 MiB of their membership rows as JSON. The workspace's own native sources stay bounded before any selection: 2,000 sources and 16 MiB of text.

Exported packages keep narrower format limits, so ia kb pack refuses a selection of more than 1,000 records or 64 KiB that the local tools can accept. See SPEC.md.

Committed exports isolate Git from user/system configuration and GIT_CONFIG_* environment settings. In particular, user safe.directory exceptions are not inherited; run export from a checkout owned by the executing account.