ts-safeql/safeql
Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL. observed · 2026-08-28
Health v2 · maintenance only
88/100
- Activity 90
- Release rhythm 78
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 1455
- days_rel: 64
- days_push: 64
- n_releases_24m: 218
Adoption not part of the score
1561 stars · 33 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
SafeQL is an ESLint plugin that validates raw SQL queries against a live PostgreSQL schema and automatically infers TypeScript types for query results. It works with popular SQL clients like Prisma, postgres.js, Slonik, Kysely, and Drizzle.
Use cases
- validate raw SQL queries against postgres schema
- auto-generate typescript types from sql queries
- catch sql column typos before runtime
- lint sql queries in eslint
- infer query result types for pg client
- generate zod schemas from sql queries
When to choose
- you write raw SQL in a TypeScript project and want type safety
- you use PostgreSQL with clients like Prisma, postgres.js, Kysely, or Drizzle
- you want to catch SQL errors at lint time instead of runtime
When to avoid
- you don't use PostgreSQL
- your project doesn't use ESLint or TypeScript
- you rely solely on an ORM's generated types without raw SQL
Facets
plugin · maturity active
linter type-system database parser databases developer-tools web-development cli eslint-plugin postgresql sql-type-inference static-analysis typescript nodejs
3 sources
- readme: https://github.com/ts-safeql/safeql · fetched 2026-08-28 · af731d40d1fd
- homepage: https://safeql.dev · fetched 2026-08-29 · 0507b598494f
- site_page: https://safeql.dev/guide/getting-started.html · fetched 2026-08-29 · 3e54b3187b6d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ts-safeql/safeql | main | 88 |
For agents
markdown · JSON · MCP: product_card(name="ts-safeql/safeql")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem