ts-pg-model

JSON →
library 2.0.39 ·javascript
verified Jun 5, 2026

ts-pg-model generates TypeScript type definitions directly from a live PostgreSQL database by introspecting schemas, tables, columns, enums, and user-defined types. The current stable version is 2.0.39, with releases on GitHub and npm. Key differentiators: supports Postgres connection via URI or environment variable, dotenv integration, customizable naming conventions (change-case), target selection for schemas/tables/columns, and user-defined type mapping for JSON/UDTs. Output directory defaults to ./src/generated.