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

supabase-schema-tool

v1.0.1

Published

A CLI tool that organizes a PostgreSQL or Supabase SQL schema export into a clean directory structure.

Readme

Supabase Schema Tool

PostgreSQL & Supabase Schema Organizer

Supabase Schema Tool is a lightweight command-line utility that takes a PostgreSQL or Supabase SQL schema dump file and automatically organizes it into clean, dedicated folders for tables, functions, views, indexes, RLS policies, triggers, types, and extensions.

License: MIT Node.js Version


Features

  • Automatic Classification — Sorts tables, functions, views, indexes, RLS policies, triggers, types, and extensions into dedicated subdirectories.
  • Table Statement Merging — Automatically pairs ALTER TABLE statements with their parent CREATE TABLE definitions.
  • Metadata Generation — Creates a machine-readable manifest.json and an auto-generated summary README.md.
  • Safe & Non-Destructive — Extracts database objects verbatim without altering or inventing SQL statements.

Installation

Install globally via npm:

npm install -g supabase-schema-tool

Or run directly using npx:

npx supabase-schema-tool schema.sql

Usage & Commands

# Organize SQL schema into default ./schema_output directory
split-schema schema.sql

# Specify a custom output directory
split-schema schema.sql --output ./database
split-schema schema.sql -o ./database

# Enable verbose debug logging
split-schema schema.sql --verbose

# Display help information
split-schema --help
split-schema -h

# Display version number
split-schema --version
split-schema -v

Note: You can also run commands using supabase-schema-tool or npx supabase-schema-tool.


Output Structure

schema_output/
├── tables/          # CREATE TABLE + ALTER TABLE statements
├── functions/       # CREATE FUNCTION / PROCEDURE statements
├── views/           # CREATE VIEW / MATERIALIZED VIEW statements
├── indexes/         # CREATE INDEX statements
├── policies/        # CREATE POLICY statements
├── triggers/        # CREATE TRIGGER statements
├── types/           # CREATE TYPE statements
├── extensions/      # CREATE EXTENSION statements
├── misc.sql         # All other statements (SET, GRANT, REVOKE, COMMENT, etc.)
├── manifest.json    # Generation metadata
└── README.md        # Summary report

Supported Input

  • PostgreSQL schema exports (pg_dump)
  • Supabase CLI schema exports (supabase db dump)
  • Any valid PostgreSQL DDL .sql file

License

MIT License