supawatch
v0.14.2
Published
Your Postgres schema, compiled to everything: validators, types, API layers, AI surfaces, tests and docs. Regenerated by the database itself, verified against real rows.
Downloads
3,211
Maintainers
Readme
supawatch
Your Postgres schema, compiled to everything: validators, types, API layers, AI surfaces, tests, seeds and docs. A DDL event trigger tells the watcher when the schema moved, so the output regenerates itself, and every runnable artifact is verified against real rows. This package is the CLI and config entry point.
npm install --save-dev supawatch
npm install zod # peer of the zod target
npx supawatch initinit writes an event-trigger migration and a supawatch.config.ts. Apply
the migration, set DATABASE_URL (environment or ./.env), then:
npx supawatch watch # live regeneration during development
npx supawatch generate # one shot, for CI or scripts
npx supawatch check # CI drift gate, writes nothing, nonzero exit on drift
npx supawatch doctor # verify connection, trigger, LISTEN round trip, targetsTargets are opt-in, one per thing you want generated. Full documentation, configuration reference, driver profiles, and honest limits: github.com/omar-dulaimi/supawatch.
MIT.
