Skip to main content
Use contracts when one repository publishes the database shape another repository consumes. The commands export and diff JSON contracts locally. Store or transfer the resulting JSON with the repository and artifact systems your teams already use.

Run it

Subcommands

command
Build a JSON schema contract from --from, defaulting to the configured schema tree.
command
Compare --from <file> with --to <source>, defaulting --to to the configured schema tree.

Flags

source
Schema source used by export.
source
Candidate source used by diff. Defaults to the configured schema tree.
file | stdout
Output destination for export. Defaults to stdout.

Boundaries

Contract JSON contains modeled schema metadata, not database URLs, migration files, table rows, or live database credentials. Review it before committing or transferring it when object names or comments are sensitive.

Exit codes

Last modified on July 24, 2026