# SweetIQ/schemats

Generate typescript interface definitions from SQL database schema

Repository: https://github.com/SweetIQ/schemats
Canonical: https://ross.abutalabs.com/products/schemats
Homepage: https://www.npmjs.com/package/schemats
Language: TypeScript
License: MIT
License Family: permissive
Topics: typescript, postgresql, postgres, schema, automation, mysql, reflection
Last push: 2022-01-06T15:13:34+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3670, "days_push": 1700, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1061, forks 102 (observed 2026-08-28T04:03:25.951675+00:00)

## What it is
Schemats is a CLI tool that automatically generates TypeScript interface definitions from Postgres or MySQL database schemas. It introspects tables and columns to produce statically typed interfaces for use in TypeScript projects.

## Use cases
- generate typescript types from postgres schema
- create typescript interfaces from mysql database tables
- keep typescript types in sync with database schema
- statically type sql query results in typescript
- generate type definitions for all tables in a database schema
- avoid hand-writing typescript interfaces for database rows

## When to choose
- you use Postgres or MySQL with TypeScript and want types derived directly from the live schema
- you want a simple CLI or config-file-driven code generation step in your build
- you prefer lightweight schema-to-interface generation over a full ORM

## When to avoid
- you use a database other than Postgres or MySQL
- you want runtime query validation or a query builder, not just type definitions
- you need an actively developed tool with recent updates and broad database support

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: database, type-system, cli
- domain: databases, developer-tools, web-development
- platform: cli, cross-platform
- tags: typescript, postgresql, mysql, sql-schema, code-generation, schema-reflection, nodejs

## Member repositories
- SweetIQ/schemats (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:25.951675+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:56:48.736641+00:00, confidence not recorded.
  - readme: https://github.com/SweetIQ/schemats (fetched 2026-08-28T04:03:25.951675+00:00, sha 5ae8899f67e5)
  - homepage: https://www.npmjs.com/package/schemats (fetched 2026-08-29T12:58:32.208085+00:00, sha 706bf26e02e5)
  - registry_npm: https://registry.npmjs.org/schemats (fetched 2026-08-29T12:58:32.210791+00:00, sha b4e4b75f4c34)
- Data as of 2026-08-30T08:39:29.467469+00:00.
