Skip to content

CLI Commands

This page is the complete command reference. Each command auto-detects mountsqli.config.* from the current directory.

Create a migration file from schema changes.

Terminal window
mountsqli migrate generate [--name <n>] [--dir <path>]
Option Effect
--name <n> custom migration name
--dir <path> migrations directory override

Output: Created migration: <file> (writes SQL, does not apply).

Run pending migrations in transactions.

Terminal window
mountsqli migrate apply [--dir <path>] [--dry-run]
Option Effect
--dir <path> migrations directory override
--dry-run print SQL, don’t execute

Output: Applying <file> ... done per step, then Applied N migration(s).

Show applied and pending migrations.

Terminal window
mountsqli migrate status

Output: lists Applied: and Pending: migration names.

Run the all-in-one server: REST + storage + realtime + Studio.

Terminal window
mountsqli dev [--port <n>]
Option Effect
--port <n> port (default 3737)

Output: REST/STORE/LIVE/STUDIO on http://localhost:<port>

Health report: schema drift, index suggestions, plan warnings.

Terminal window
mountsqli analyze

Output: a structured report (drift vs live DB, suggested indexes, warnings).

Emit OpenAPI JSON from named QueryPlans.

Terminal window
mountsqli api generate [--out <path>]

Reads the output path from mountsqli.config.js or defaults to openapi.json.

Scaffold a mountsqli.config.ts in the current directory.

Terminal window
mountsqli init
  • Script migrate apply into deploys; run analyze in CI.
  • Use --dry-run before applying to production.
  • Expecting migrate rollback (not provided — see Migrations → Rollback).
  • Running dev and migrate against different databases (:memory: vs file).