> ## Documentation Index
> Fetch the complete documentation index at: https://supaschema.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# config validate

> Validate supaschema config paths, sources, and credential references.

Use `config validate` after editing `supaschema.config.json`.

The command loads config, checks path and source relationships, and reports warnings or errors before a migration command depends on it.

It also blocks pending first-run path confirmation. If `.supaschema/install.json` says `pathConfirmationNeeded: true`, set `schemaPaths` and `migrationsDir` explicitly in `supaschema.config.json` before running zero-source migration commands.

## Use this when

* Schema or migration paths changed.
* Source defaults changed.
* Named environments were added.
* Agent or CI automation needs structured config diagnostics.

## Run it

```bash theme={null}
npx supaschema config validate
npx supaschema config validate --json
npx supaschema --config config/supaschema.config.json config validate
```

## Flags

<ParamField path="--json" type="boolean">
  Print `{ "ok": boolean, "diagnostics": [...] }`.
</ParamField>

## Exit codes

| Code | Meaning                                   |
| ---- | ----------------------------------------- |
| `0`  | Config is valid, with or without warnings |
| `1`  | Runtime failure                           |
| `2`  | Config diagnostics contained an error     |

## Related

<CardGroup cols={2}>
  <Card title="Configuration" icon="sliders-horizontal" href="/docs/configuration/config-file">
    Review the config contract and defaults.
  </Card>

  <Card title="Environments" icon="server" href="/docs/configuration/environments">
    Configure named database targets.
  </Card>

  <Card title="Doctor" icon="stethoscope" href="/docs/commands/doctor">
    Diagnose config plus local environment.
  </Card>

  <Card title="Init" icon="sparkles" href="/docs/commands/init">
    Scaffold or repair the generated setup.
  </Card>
</CardGroup>
