CLI Overview
The mountsqli CLI is a single zero-dependency binary. It auto-detects your
mountsqli.config.* from the current directory and runs migrations, a dev
server, the Studio dashboard, and a health analysis.
Install
Section titled “Install”The CLI ships with the core package. Run it without a global install:
npx mountsqli --helppnpm mountsqli --helpbunx mountsqli --helpCommands
Section titled “Commands”| Command | What it does |
|---|---|
mountsqli migrate generate |
diff schema → write a migration file |
mountsqli migrate apply |
run pending migrations |
mountsqli migrate status |
show applied vs pending |
mountsqli dev |
run REST + storage + realtime + Studio on one port |
mountsqli analyze |
health report: drift, index suggestions, plan warnings |
mountsqli api generate |
emit OpenAPI from named QueryPlans |
mountsqli init |
scaffold a config file |
Config auto-detection
Section titled “Config auto-detection”The CLI looks for mountsqli.config.ts, .js, or .json in the current
directory. You do not pass a path.
Best practices
Section titled “Best practices”- Run
migrate applyin your deploy step. - Use
devfor local full-stack development — one port serves everything. - Run
analyzein CI to catch drift before release.
Common mistakes
Section titled “Common mistakes”- Running migrations against
:memory:in one shell and the app against a file. - Forgetting the config file is in the current directory.
Related
Section titled “Related”- Commands — full flag reference.
- mountsqli dev — the all-in-one server.
- Migrations → Apply — what apply does.
