postgres-schema-ts

JSON →
library 0.5.0 ·javascript
verified Jun 5, 2026

Convert PostgreSQL schemas into TypeScript interfaces. v0.5.0 is the latest stable release. This package provides a CLI and programmatic API to generate TypeScript type definitions from Postgres database schemas. It focuses on simplicity with no configuration required, supporting both full schema inference and per-table generation. Unlike alternatives like schemats, it is Postgres-only, uses inline enums, and avoids namespaces. The generation respects PostgreSQL defaults such as nullable columns (producing union with null) and timestamp mapping to Date. No recent updates since 2022.