gajus/slonik
A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL. observed · 2026-10-15
Health v2 · maintenance only
95/100
- Activity 99
- Release rhythm 87
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 3497
- days_rel: 10
- days_push: 10
- n_releases_24m: 1082
Adoption not part of the score
4939 stars · 156 forks observed · 2026-10-15
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Slonik is a Node.js PostgreSQL client library written in TypeScript that emphasizes writing raw SQL with strict runtime validation and build-time type safety. It provides safe connection and transaction handling, query retrying, interceptors, and detailed logging.
Use cases
- query postgres from nodejs with type safety
- write raw sql queries safely in typescript
- manage postgres connection pools and transactions
- prevent sql injection with safe value interpolation
- add logging and interceptors to database queries
- retry failed queries and transactions automatically
When to choose
- you prefer writing raw SQL over query builders or ORMs
- you want runtime validation of query results in TypeScript
- you need robust transaction and connection pool handling
- you want detailed query logging and debugging
When to avoid
- you want an ORM with automatic schema-to-object mapping
- you need dynamic SQL generation like Knex.js
- you are not using Node.js or PostgreSQL
Facets
library · maturity active
database-driver database orm middleware logging databases backend web-development developer-tools postgresql sql type-safety connection-pool transactions query-builder-alternative nodejs typescript javascript
1 source
- readme: https://github.com/gajus/slonik · fetched 2026-10-15 · 368bdb8bf27b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| gajus/slonik | main | 95 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem