type-contract to inspect breaking changes to the generated type surface.
type-contract diffs the type shapes of two schema sources (before vs after). It does not connect to a database.
supaschema sync runs deploy-blocking type-safety gates through workflow.type_safety. When a selected sync target resolves a database URL, the deploy gate compares the target’s live PostgreSQL catalog with the declarative schema tree. That package-owned deploy gate is separate from the standalone type-contract --enforce license path.
type-contract --enforce requires a signed local entitlement token. Without a valid entitlement, the command prints the findings in report-only mode and exits 0; with a valid entitlement, breaking changes exit 2.
Use this when
- A migration must not break downstream TypeScript/Zod consumers.
- CI should gate breaking type-contract changes on a pull request.
- You want to understand the type-safety diagnostics that
synccan block before apply.
Run it
--from defaults to git:HEAD and --to to the declarative tree.
Flags
Previous schema source. Defaults to
git:HEAD.New schema source. Defaults to the declarative tree.
Output format. An unknown value exits
2 with an error.Fail (exit
2) on a breaking change in the standalone command. This CLI flag
requires a license; the sync deploy-safety gate is configured separately by
workflow.type_safety.What it flags as breaking
- a removed table;
- a removed column;
- a changed column type;
- a removed enum, or a removed enum value.
Exit codes
| Code | Meaning |
|---|---|
| 0 | No breaking change, or report-only (no --enforce, or unlicensed). |
| 2 | Breaking change under --enforce with a valid license. |
Related
ORM-free apps
See how generated types and validators replace ORM schema ownership.
Sync command
Run deploy-blocking type-safety and RLS-safety gates before apply.

