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

@midzap/cli

v0.1.0

Published

Convert an existing web2 React app to a Midnight zero-knowledge privacy app — one command.

Readme

@midzap/cli

Turn an existing web2 React app into a Midnight zero-knowledge privacy app — one command.

npx @midzap/cli add age-gate ./my-shop

It finds the self-reported control that gates an action (an age checkbox, a file upload, a real-name login), rewrites it as a MidnightZap predicate component, wraps your app root in <MidnightZapProvider>, drops in the compiled Compact circuit + a midnight.ts binding, and patches your Vite config for the Midnight runtime.

Recipes

| Recipe | Finds | Rewrites to | |---|---|---| | age-gate | <input type="checkbox"> ("I am 21+") gating a button | <ProveThreshold field="age" threshold={21}> | | credential-check | <input type="file"> (upload your licence/Rx) gating a button | <ProveCredentialValid issuer=…> | | anon-login | a {loggedIn ? … : <button>Log in…</button>} branch | <ProveMembership set=… actionTag="login"> |

Commands

npx @midzap/cli add <recipe> [dir]   apply a recipe (default dir: .)
npx @midzap/cli list                 list recipes
npx @midzap/cli doctor [dir]         check an integrated project

  --dry-run   print the diff, write nothing
  --yes, -y   skip confirmation

What add changes

  1. your gated component — the self-reported control → a <Prove…> gate, with the disabled={!confirmed} guard removed.
  2. your app root — wrapped in <MidnightZapProvider>.
  3. src/midnight.ts (new) — the contract binding. Add your deployed address here.
  4. src/managed/<circuit>/ (new) — the compiled Compact circuit + zk params, ready to serve.
  5. vite.config.* — marks the @midnight-ntwrk WASM runtime external so the app builds.
  6. package.json — adds @midzap/sdk.

Run --dry-run first to see all of it as a diff.

After conversion

The app runs immediately in a local preview (the predicate logic runs in-browser). For real proofs on Midnight: deploy the circuit, set the address in src/midnight.ts, finish the Vite setup, and run with VITE_MZ_LIVE=1. See GO_LIVE.md.