knex
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
A SQL query builder, not a full ORM.
When to choose it: You want to compose SQL programmatically (and run migrations) without the abstraction of a full ORM.
- + Close to SQL
- + Built-in migrations
- + Lightweight
- - No models or generated types
- - Lower-level
- Latest version
- 3.2.10
- Monthly downloads
- 17,423,302
- GitHub stars
- 20,285
- Minified + gzip
- 86.2 kB
- Dependencies
- 14
- License
- MIT
Compare knex with
Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.