CLI Reference

Command-line tools for managing your Stabilize ORM project.
See stabilize-cli for full docs.

Installation

Install the Stabilize CLI globally:

bun add -g stabilize-cli
stabilize generate
Generate models, migrations, or seeds
stabilize-cli generate model User name:string age:int
stabilize-cli generate migration user
stabilize-cli generate seed user --count 10

Model Options:

  • --table - Specify custom table name
  • --timestamps - Add timestamp columns
  • --soft-delete - Enable soft deletes

Seed Options:

  • --count - How many rows to generate
stabilize migrate
Run pending migrations
stabilize-cli migrate
stabilize-cli migrate:rollback

Executes or rolls back migrations in order.

stabilize seed
Run database seeders
stabilize-cli seed
stabilize-cli seed:rollback

Executes all seed files to populate the database with data, or roll back the last applied seed.

Options:

  • --class - Run a specific seeder class
  • --count - Number of rows to generate in seeds
stabilize db:drop
Drop all tables in the database (dangerous!)
stabilize-cli db:drop

Permanently deletes all tables in the database.
Use with caution!

Options:

  • --force - Skip confirmation prompt
  • --config - Path to db config file
stabilize db:reset
Drop, migrate, and seed your database
stabilize-cli db:reset

Destroys and rebuilds your database: drops tables, applies migrations, and seeds data.

Options:

  • --force - Skip confirmation
  • --config - Path to db config file
stabilize status
Show migration and seed status
stabilize-cli status

Shows which migrations and seeds have been applied.