CLI tool that generates Zod v4 schemas and JSDoc typedefs from PostgreSQL database metadata. Version 0.0.1 is the initial release. It connects to a Postgres instance, inspects tables, and outputs an ESM module with Zod schemas for runtime validation. Unlike ORM-based solutions or generic schema generators, it targets Zod v4 specifically and is intentionally minimal: no migrations, no query building, no abstraction layer. Relies on a peer dependency of zod@^4.0.0. Development is active, with frequent updates expected.
npm install database-validator-generatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs the cli and zod, generates schemas from a postgres database, then shows the output file.
Install zod@^4.0.0: npm install zod@4
Use import() or convert your project to ESM (type: "module" in package.json).
Use --connection with sslmode=require or set DATABASE_URL accordingly.
Run: npm install zod@^4.0.0
Use dynamic import: import('./schemas.mjs') or set type: 'module' in package.json.Ensure you have zod@^4.0.0 installed.