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

@r_masseater/kestrion

v0.1.1

Published

Ports the Node.js package ecosystem to Effect: the package.json Schema and its helpers, and Effect wrappers over the official npm, pnpm and Node.js readers.

Readme

@r_masseater/kestrion

Ports the Node.js package ecosystem to Effect: the package.json Schema and its helpers, and Effect wrappers over the official npm, pnpm and Node.js readers.

It does not parse anything itself. npm's @npmcli/package-json reads and writes package.json, the @pnpm/* packages read pnpm's files, and node:module finds installed packages. kestrion turns their results into Effect values, their failures into tagged errors and a missing file into Option.

It requires Node.js 26 or later. effect is a peer dependency. Each upstream package is an optional peer dependency of the entry that uses it, so you install only the readers you call.

vp add @r_masseater/kestrion effect

| Entry | Upstream | Install with it | | ---------------------------- | ---------------------- | ----------------------------------------------- | | @r_masseater/kestrion | none | nothing | | @r_masseater/kestrion/npm | @npmcli/package-json | @npmcli/package-json | | @r_masseater/kestrion/pnpm | @pnpm/* readers | the @pnpm/* package of each function you call | | @r_masseater/kestrion/node | node:module | nothing |

Describe a package.json

The main entry holds PackageJsonSchema, its type PackageJson, and the helpers that read its fields. Every field is optional, so any manifest decodes and your code states which fields it needs. VersionedPackageJsonSchema also requires name and version.

import { binEntriesOf, exportEntriesOf, namesIn, optionalPeerNames } from "@r_masseater/kestrion";
  • namesIn(manifest, sections) lists the names declared in the dependency sections you pick. runtimeDependencyNames takes dependencies, peerDependencies and optionalDependencies.
  • optionalPeerNames lists the peers marked optional in peerDependenciesMeta.
  • exportEntriesOf turns exports into [subpath, target] pairs, and targetsIn lists every file a target names. importSpecifierOf joins a package name and a subpath.
  • binEntriesOf turns bin into [command, file] pairs. A string bin takes the unscoped package name as the command, as npm does.

Read and write with npm

import { decodePackageJson, readPackageJson, updatePackageJson } from "@r_masseater/kestrion/npm";
import { Effect } from "effect";

const name = readPackageJson("libs/a").pipe(Effect.map((manifest) => manifest.name));
const added = updatePackageJson("libs/a", { optionalDependencies: { b: "1.0.0" } });
  • decodePackageJson(text) parses text you already hold and returns Option. parsePackageJson(text) does the same and fails with PackageJsonUnreadable.
  • readPackageJson(directory) and readVersionedPackageJson(directory) load the file with @npmcli/package-json.
  • updatePackageJson merges fields into the file and keeps its indentation and line endings. writePackageJson creates a new file.

Read pnpm

import { lockedGraph, readWorkspaceManifest } from "@r_masseater/kestrion/pnpm";
  • readWorkspaceManifest(root) reads pnpm-workspace.yaml, and updateWorkspaceManifest(root, fields) writes fields back.
  • findWorkspaceProjects(root, patterns) lists the projects the patterns match.
  • readWantedLockfile(root) reads pnpm-lock.yaml. lockedPackageIds and lockedGraph read its package ids and dependency edges. depPathsOf and parseDependencyPath read dependency paths.

Each call fails with PnpmUnreadable, which carries the root and the reason.

Find an installed package

import { findPackageJson } from "@r_masseater/kestrion/node";

const file = findPackageJson("effect", import.meta.url);

findPackageJson resolves a package from the module you pass, as import would, and returns the path of its package.json. It works even when the package does not export ./package.json.

Agent skills

The package ships agent skills in skills/. Add permissions: { "@r_masseater/kestrion": { skills: true } } to pnpm-workspace.yaml and vp install links them into the skill directories of your agents.