New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stabilize-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stabilize-cli

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

latest
Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
4
-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

Stabilize ORM CLI

NPM Version License Stabilize ORM

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

CommandDescription
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
migrateApply all pending migrations
migrate:rollbackRoll back the most recent migration
migrate:freshDrop all tables and re-run migrations
seedRun 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:backupBackup the database to a timestamped file
db:restore <file>Restore from a backup file
db:tablesList all tables with row counts
db:sizeShow database and table size statistics
statusShow migration and seed status
healthCheck database and cache health
query <sql>Execute a raw SQL query
infoShow 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.

Created by **ElectronSz**

Keywords

cli

FAQs

Package last updated on 02 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts