Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL.
See the code
SafeQL - Automatic Type Inference & Validation for PostgreSQL Queries • Get started
SafeQL automatically infers the type of the query result based on the query itself.
SafeQL works with any PostgreSQL client, including Prisma, Sequelize, pg, Postgres.js, and more.
SafeQL was built in mind to be easy to use and integrate with your existing codebase.
SafeQL was built with monorepos and microservices in mind, and it's easy to use with multiple databases.
I would first recommend follow the instructions in the documentation.
Set up ESLint following the typescript-eslint Getting Started docs, to enable TypeScript language support in ESLint.
npm install --save-dev @ts-safeql/eslint-plugin libpg-query
(top 24 of 31)
768 followers · starred Sep 2022
673 followers · starred May 2023
3,232 followers · starred Mar 2024
73 followers · starred Dec 2025
Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL.
See the code
SafeQL - Automatic Type Inference & Validation for PostgreSQL Queries • Get started
SafeQL automatically infers the type of the query result based on the query itself.
SafeQL works with any PostgreSQL client, including Prisma, Sequelize, pg, Postgres.js, and more.
SafeQL was built in mind to be easy to use and integrate with your existing codebase.
SafeQL was built with monorepos and microservices in mind, and it's easy to use with multiple databases.
I would first recommend follow the instructions in the documentation.
Set up ESLint following the typescript-eslint Getting Started docs, to enable TypeScript language support in ESLint.
npm install --save-dev @ts-safeql/eslint-plugin libpg-query
(top 24 of 31)
768 followers · starred Sep 2022
673 followers · starred May 2023
3,232 followers · starred Mar 2024
73 followers · starred Dec 2025