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

stabilize-cli

v2.2.0

Published

Command-line interface for Stabilize ORM — model generation, migrations, seeding, health checks, and database management

Readme

Stabilize ORM CLI

The official command-line interface for the Stabilize ORM.


stabilize-cli is the essential companion tool for Stabilize ORM, providing a powerful set of commands to manage your database schema, generate files, and run development tasks directly from your terminal.


Features

  • Code Generation: Instantly scaffold new models, migrations, seed files, and REST API routes.
  • Flexible Field Arguments: Pass column definitions as arguments to generate:model, e.g. name:string active:boolean.
  • Multi-Row Seeding: Use --count <number> with generate:seed to control seed row count.
  • Schema Management: Auto-generate database-specific SQL migrations from models.
  • Soft Deletes & Versioning: Scaffold models with softDelete and versioned options.
  • Database Backup & Restore: Backup and restore your database with db:backup and db:restore.
  • REST API Generation: Generate full CRUD API scaffolds with generate:api.
  • Fresh Migrations: Drop and re-migrate with migrate:fresh (no seed).
  • Database Size Analysis: View table sizes and row counts with db:size.
  • Cross-DB Compatibility: Works with MySQL, PostgreSQL, and SQLite.
  • TypeScript & Bun Support: All generated files are TypeScript-first.

Installation

# Using npm
npm install -g stabilize-cli

# Using Bun
bun add -g stabilize-cli

Commands

| Command | Description | | ----------------------------------- | ----------------------------------------------- | | generate:model <Name> [fields...] | Create a new model file in models/ | | generate:migration <Name> | Generate a migration from a model | | generate:seed <Name> | Generate a seed file. Use --count <n> | | generate:api <Name> | Generate a REST API scaffold from a model | | migrate | Apply all pending migrations | | migrate:rollback | Roll back the most recent migration | | migrate:fresh | Drop all tables and re-run migrations | | seed | Run all pending seed files | | db:drop [--force] | Drop all tables (use --force to skip confirm) | | db:reset [--force] | Drop, migrate, and seed the database | | db:backup | Backup the database to a timestamped file | | db:restore <file> | Restore from a backup file | | db:tables | List all tables with row counts | | db:size | Show database and table size statistics | | status | Show migration and seed status | | health | Check database and cache health | | query <sql> | Execute a raw SQL query | | info | Show CLI and environment information |

Command Examples

Generate a User model:

stabilize-cli generate:model User name:string active:boolean email:string

Generate a REST API scaffold:

stabilize-cli generate:api User
# Creates api/User.ts with full CRUD routes

Backup the database:

stabilize-cli db:backup
# Creates backups/backup_20250101120000.db

Restore from backup:

stabilize-cli db:restore backups/backup_20250101120000.db --force

Fresh migration (drop + migrate):

stabilize-cli migrate:fresh --force

View database size:

stabilize-cli db:size
# Shows file size, table count, and row counts

Check status:

stabilize-cli status

Project Documentation


License

MIT License - see LICENSE.