knex/knex
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use. observed · 2026-08-28
Health v2 · maintenance only
92/100
- Activity 89
- Release rhythm 90
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 3.0
- age_days: 4995
- days_rel: 68
- days_push: 68
- n_releases_24m: 9
Adoption not part of the score
20342 stars · 2217 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Knex.js is a batteries-included SQL query builder for JavaScript supporting PostgreSQL, MySQL/MariaDB, CockroachDB, MSSQL, SQLite3, Oracle, and Amazon Redshift. It provides a fluent query and schema builder with transactions, connection pooling, streaming, migrations, and both promise and callback APIs.
Use cases
- build sql queries programmatically in node.js
- write portable queries across multiple sql databases
- run database schema migrations
- manage transactions and connection pooling in node apps
- avoid writing raw sql strings by hand
- swap database backends without rewriting queries
When to choose
- you want a flexible query builder rather than a full ORM
- you need to support multiple SQL dialects with one codebase
- you want migrations and schema management built in
- you use ORMs like Objection.js or MikroORM that build on Knex
When to avoid
- you prefer a full-featured ORM with model relations out of the box
- you work outside the Node.js/JavaScript ecosystem
- you need a NoSQL or document database
Facets
library · maturity stable
database database-driver orm databases backend web-development developer-tools sql-query-builder query-builder schema-migrations multi-dialect connection-pooling transactions nodejs javascript
4 sources
- readme: https://github.com/knex/knex · fetched 2026-08-28 · 3e4037c258b2
- homepage: https://knexjs.org/ · fetched 2026-08-29 · f77fba2b7873
- site_page: https://knexjs.org/faq · fetched 2026-08-29 · a2c3b5bea791
- site_page: https://knexjs.org/changelog.html · fetched 2026-08-29 · ff40bbdac081
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| knex/knex | main | 92 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem