// the take
Schemats is a CLI and library that introspects a Postgres or MySQL schema and spits out matching TypeScript interfaces, so queries against `pg-promise` or similar can be typed without hand-writing them. It's aimed at teams on raw SQL or query builders who want schema-derived types without pulling in a full ORM.
It correctly reflects NOT NULL constraints into strict-null-checked fields instead of making everything optional, which is the part most homegrown codegen scripts get wrong. The config file (schemats.json) makes regeneration a one-command, CI-friendly step rather than a long CLI invocation to remember. Scope is narrow and the output is plain interfaces with no runtime dependency, so there's nothing to wire into your app beyond importing the generated file.
Last commit is January 2022 and CI is on Travis, which is dead — this project is unmaintained and any bug or TS-version incompatibility you hit is yours to fix in a fork. Only Postgres and MySQL are supported, with no SQLite, SQL Server, or enum/composite-type handling mentioned anywhere. It's a one-shot snapshot tool with no watch mode or migration hook, so types silently drift from the real schema until someone remembers to rerun it. Newer alternatives (kysely-codegen, drizzle-kit introspect, Prisma's db pull) cover the same need with active maintenance and better type fidelity, so starting a new project on this specifically is a bet against tools that have already superseded it.
We read the README, the directory tree and a key source file in November 2026. Nobody pays to be listed. How we judge →