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

pggate

v0.1.0

Published

EXPLAIN every Supabase query at 100,000 synthetic rows before you ship, and prove each fix: Postgres 18 (PGlite) in-process, nothing sent anywhere

Readme

pggate

Run EXPLAIN (ANALYZE, BUFFERS) on every query of your Supabase app at 100,000 rows, before you ship. pggate rebuilds your schema from your migrations (or a schema snapshot) in Postgres 18 running in-process (PGlite, WebAssembly), loads synthetic rows, explains each supabase-js chain and .sql query, and proves each suggested fix by applying it and explaining again. Nothing is sent to a pggate server: there is none.

The same engine runs in the browser at pggate.dev.

Use

npx pggate check                    # the project in the current directory (where supabase/migrations is), 100k rows
npx pggate check path/to/project    # another directory
npx pggate check --format md        # the Markdown report (the PR comment)
npx pggate --help                   # every command and option

Exit code: 0 nothing found · 1 a fail finding · 2 something could not be analysed (UNSUPPORTED_*) or needs a license key (LICENSE_REQUIRED). pggate never skips something and exits 0; list a file:line you have read under acknowledge in pggate.config.json to accept it.

Node.js 22 or later.

Tables made in the dashboard

If some tables are not created by any migration, give pggate a snapshot of your schema. It holds definitions, never rows:

npx pggate snapshot --db-url "$DATABASE_URL"   # writes supabase/pggate-snapshot.json; reads only the catalog
npx pggate snapshot --print-sql                # the same query, to run in the Supabase SQL Editor yourself
npx pggate check --snapshot supabase/pggate-snapshot.json

The output of supabase db dump works as a snapshot too, but it has to be passed with --snapshot: it has no pg_dump header, so inside supabase/migrations/ it would run as one more migration.

Free, Rescue, Guard

Free: pggate check on synthetic data, every finding with its proof, and the DDL of the first proven fix in each report. Rescue and Guard keys (pggate.dev) unlock every fix as one migration file (pggate rescue … --out), your real statistics (--dsn, --stats), the diff gate for pull requests (--base) and pggate hook. Without a key a paid feature prints LICENSE_REQUIRED and exits 2.

With a key, the CLI checks it against Lemon Squeezy's License API once per run, with a 7-day offline grace. That request carries the key (and, for an activated machine, its instance id), never your schema, queries, connection string or report.

splinter

The structural layer runs splinter, the linter behind Supabase Advisor, in the sandbox. splinter has no license upstream, so this package does not include it: installing the package downloads splinter.sql from a pinned commit and checks its sha256. If your package manager skips install scripts, run node node_modules/pggate/scripts/fetch-splinter.mjs once, or pass --no-structural.

License

Licensed file by file: most of pggate is FSL-1.1-MIT (LICENSE); the files that implement the paid features are under the pggate Commercial License (LICENSE-COMMERCIAL). LICENSING.md lists which is which. The open-source packages bundled into this package keep their own licenses, in THIRD_PARTY_NOTICES.