> ## 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.

# Introduction

> Declarative PostgreSQL schema management that is fast, AI-ready, and zero-config, with replay-safe migrations and generated TypeScript and Zod.

Use this page to decide whether supaschema fits your schema workflow.

supaschema is declarative PostgreSQL schema management that is fast, AI-ready, and zero-config. Install the package and run `supaschema init`; it discovers established project paths, writes safe defaults, and installs or merges the active coding-agent surfaces. Zero-flag commands then use the generated config.

It reads PostgreSQL schema intent from SQL files and existing migrations, compares it with another schema source, renders replay-safe migration SQL, regenerates TypeScript types and Zod validators, and can apply pending migrations through guarded targets. The declarative tree owns final schema shape; existing migrations provide source intent for operational facts such as backfills, Vault references, and workload-derived indexes. It removes the need for an ORM schema layer, Docker, or a shadow database in the schema workflow.

Published large-schema benchmarks keep the speed claim measurable: at 1,000 tables, supaschema remains in the single-digit-second lane while the compared Supabase CLI diff engines depend on database-backed replay. See [Benchmarks](/docs/benchmarks) for the methodology, environment, accuracy, and replay-safety results.

## When it helps

* Your repository should be the source of truth for PostgreSQL schema changes.
* You want migrations that can be retried safely after a failed deploy.
* You need policy, type, and generated-output changes visible before a database catches up.
* You want typed, validated application boundaries without making an ORM the schema owner.
* You use plain PostgreSQL or a hosted provider such as Supabase, Neon, RDS/Aurora, Cloud SQL, AlloyDB, or Azure PostgreSQL.

## Workflow

<Frame caption="supaschema schema workflow">
  <img src="https://mintcdn.com/supaschema/fPhYKsNr-P1ePoNU/images/concepts/supaschema-flow.svg?fit=max&auto=format&n=fPhYKsNr-P1ePoNU&q=85&s=8d08aa916f7c9b87734a71bd20465dfa" alt="supaschema workflow that parses schema files, renders a guarded migration, emits TypeScript and Zod outputs, and hands SQL to the database runner" width="1200" height="380" data-path="images/concepts/supaschema-flow.svg" />
</Frame>

You edit schema files. `supaschema sync` renders the migration, checks replay safety, regenerates contracts, stages the schema closure when Git is available, runs source-model safety gates, and runs the guarded apply or dry-run lane for one configured target. `diff`, `check`, `types`, `stage`, and `apply` remain available for focused operation.

For detailed performance, accuracy, and replay-safety results, see [Benchmarks](/docs/benchmarks).

## Start here

<CardGroup cols={2}>
  <Card title="Install" icon="download" href="/docs/installation">
    Add supaschema to the project that owns your schema files.
  </Card>

  <Card title="Quickstart" icon="terminal" href="/docs/quickstart">
    Generate and check one migration from one schema file.
  </Card>

  <Card title="Configure" icon="sliders-horizontal" href="/docs/configuration/config-file">
    Set schema paths, sources, migrations, environments, and workflow defaults.
  </Card>

  <Card title="ORM-free apps" icon="database" href="/docs/concepts/orm-free-applications">
    Use generated TypeScript and Zod contracts without making an ORM the schema
    owner.
  </Card>
</CardGroup>
