database/schemas and database/migrations. If install selected provider-specific paths, use the values in supaschema.config.json.
The commands below use npm’s local runner. Use the matching pnpm, Yarn, or Bun runner from Installation when that manager owns the project.
1
Install
Install supaschema in the package or workspace that owns your schema files,
then initialize the local project before editing the schema:
2
Write schema
Create one schema file:Your schema files are the source of truth. supaschema writes the migration.
database/schemas/app.sql
3
Sync
Run the full workflow:You will see output like this:Review the generated file. It should include a lineage marker and guarded SQL:
database/migrations/20240101120000_migration.sql
4
Focused lanes
Run a focused lane only when you need to operate one step directly:
Related
Setup
Confirm install-time paths and setup output.
Commands
Deep-dive into
diff, check, verify, and other commands.Types
Configure and consume generated TypeScript and Zod outputs.
ORM-free apps
Use generated database contracts without adding an ORM schema layer.

