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

@atarashi/registry

v1.0.0

Published

Blueprint registry: fetch, verify, cache, pin and load blueprints.

Downloads

134

Readme

@atarashi/registry

The only I/O boundary for blueprints. @atarashi/core asks this package for a LoadedBlueprint and never touches the disk or the network itself.

import { createRegistry } from '@atarashi/registry';
import { generate } from '@atarashi/core';

const registry = createRegistry({ cwd: process.cwd(), offline: false });
const plan = await generate(spec, { source: registry, atarashiVersion });

Four layers

| Layer | Where | Trust | |---|---|---| | Local | ./.atarashi/blueprints/<ns>/<name>/blueprint.json | Untrusted | | npm | atarashi-blueprint-* packages, by npm: spec | Untrusted | | Registry | atarashi.gautamsuthar.in/registry, verified and cached | Per source | | Bundled | @atarashi/blueprints, inside the npm package | Trusted |

Local wins outright, so an author can override anything while developing. Then npm. Then the registry and the bundled collection compete on version: the newer one wins, which is how a registry release ships a blueprint fix without a CLI release, while a run with no network still resolves everything from the bundled copy.

trusted is set by the source, never by the document the source serves. Only trusted blueprints may run hooks without explicit consent (doc 09, T2).

Integrity

  • The index carries a root hash over its canonicalized entries and version manifest; it is re-verified on every read, including from the cache.
  • Every tarball is checked against its sha256 digest before extraction.
  • A mismatch is a hard failure that names the artifact. There is no fallback path to an unverified copy: unreachability degrades, tampering does not.

Extraction

Archives are parsed entirely in memory and only written once every member has been validated: no absolute paths, drive letters, UNC paths, .. segments, null bytes, symlinks or hard links; per-file, total-size and entry-count ceilings; case-collision detection; and a re-check that each resolved path is inside the destination. This is a security boundary; see tests/extract.test.ts.

Cache

$XDG_CACHE_HOME/atarashi/        # ~/Library/Caches on macOS, LOCALAPPDATA on Windows
  index/1.4.2.json               # verified against its published root hash
  blueprints/db-postgres-1.2.0-8f2c…/
  meta.json                      # ETags, fetch timestamps

Content-addressed, so it is safe to share between projects and CI runs (~/.cache/atarashi makes a good CI cache key). Override with ATARASHI_CACHE_DIR.

Freshness is a 24 h TTL plus an ETag: inside the TTL nothing is requested, and after it a 304 costs one conditional GET. A pinned version skips both: a published registry version is immutable, so a cache hit is always correct.

Offline

offline: true or ATARASHI_OFFLINE=1 skips the network entirely. Bundled blueprints and anything already cached still resolve; a registry-only blueprint reports what to run to populate the cache.

Publishing

pnpm --filter @atarashi/registry build:index      # pack, hash, emit v1/index.json
pnpm --filter @atarashi/registry bump:versions    # propose version-manifest bumps

build-index.mts is deterministic (sorted members, fixed mtime, no uid/gid), so rebuilding the same sources produces byte-identical tarballs and the same digests. .github/workflows/registry-publish.yml publishes it and refuses to overwrite a version that already exists.