supaschema.config.json is the project-owned place for persistent defaults. Read it as four decisions, not as a flat list of switches.
Use the detailed field reference when the project needs a non-default path, source, generated-output policy, validator, or apply target.
Load order
supaschema looks for config in this order:
--config <path>(.json)supaschema.config.jsonin the working directory- Built-in defaults
$schema pointer to the shipped supaschema-config.schema.json, so editors can autocomplete and validate every key.
Generated config
Generic PostgreSQL installs write explicit defaults so humans, agents, and editor schema validation agree on the same workflow. Schema tree and diff target:schemaPaths is recursive. A root such as database/schemas can contain nested folders like database/schemas/app/tables.sql or database/schemas/auth/policies/read.sql; supaschema reads every nested .sql file and merges the parsed objects into one schema model. Its first entry is the only configured after-state owner. migrationsDir owns generated output, existing migration source intent, and generated-lineage baseline proof.
Generated contracts:
workflow.migration_sync: "auto" keeps bare supaschema sync enabled. Target mode decides what is selected, but only one target may be automatic because cross-target apply is not atomic. Set a target to "manual" to omit it from bare sync, set workflow.migration_sync to "manual" to require --target <name>, or set it to "disabled" to block apply.
Provider detection can change the initial schemaPaths and migrationsDir values during install. Supabase installs also seed managedSchemas with the Supabase platform schema list and copy those names into schemas.exclude; generic PostgreSQL, Neon, RDS/Aurora, Cloud SQL, AlloyDB, and Azure PostgreSQL installs use managedSchemas: [] unless you configure otherwise.
For the object classes, provider surfaces, and unsupported DDL boundaries that
determine what belongs in your declarative tree, see the support
matrix.
src/config/schema.ts plus the shared contract in src/config/contract.ts into the shipped supaschema-config.schema.json. The installer consumes the generated bin/config-contract.mjs mirror from the same contract. This page is the public reference for those fields.
Adapter
adapter has one current value: auto.
auto means provider-specific behavior is not selected through an adapter switch. Provider-specific setup is expressed through paths, managedSchemas, transactionMode, excludedGrantRoles, and explicit command flags such as verify --ensure-environment. Workflow consent lives in the workflow object.
Workflow policy
Theworkflow object is the machine-readable contract used by agent hooks, CLI defaults, generated contract guidance, migration automation, and deploy safety gates.
Options
Validate and repair
Useconfig validate when an agent or CI job needs a machine-readable check of path fields, source defaults, and inline credential risks:
.supaschema/install.json records pending path confirmation, config validate exits with an error until supaschema.config.json explicitly sets schemaPaths and migrationsDir.
Use init --dry-run --json to inspect what install would write before changing the repository:
init --repair to rewrite supaschema.config.json from the canonical contract. Existing JSON values are preserved where they are valid; removed keys and unsupported values fail instead of being repaired. A normal install or init run leaves an existing JSON config untouched.
supaschema.config.json.
Validators
internal-parser is always the correctness owner. Optional external validators run as subprocesses during check and verify:
squawk/squawk-cli— runs thesquawkbinarypgls/postgres-language-server/@postgres-language-server/cli— runspostgres-language-server checksqlfluff— runs the external Pythonsqlfluff lint --dialect postgres
SUPA_VALIDATOR_UNAVAILABLE as an error: configured checks may not silently skip.

