sql-code-generator

JSON →
library 0.10.1 ·javascript
verified Jun 5, 2026

A CLI tool that generates TypeScript type definitions and typed query functions from SQL schemas and queries, supporting PostgreSQL and MySQL. At version 0.10.1, it's in early development with an oclif-based CLI. Key differentiators: generates both types and executable query functions, works with existing .sql files and .ts files containing SQL strings, and uses a single config file (codegen.sql.yml). Requires peer dependency yesql 3.2.2. Inspired by graphql-code-generator.