knex alternatives
8 packages that do the same job as knex: @prisma/client, kysely, sequelize, drizzle-kit, drizzle-zod, drizzle-seed, sql-template-tag, kysely-postgres-js. Figures below are from npm, GitHub and Bundlephobia.
| Package | Weekly downloads | 12-month change | Gzip | Dependencies | Last release | Module | Types | Runtimes |
|---|---|---|---|---|---|---|---|---|
| knex This package | 3.8m | +74% | - | 14 | 2 months ago | CommonJS | Bundled | - |
| @prisma/client | 11.8m | +235% | - | 1 | 30 days ago | ESM + CommonJS | Bundled | - |
| kysely | 12m | +1153% | - | 0 | 9 days ago | ESM only | None | - |
| sequelize | 2m | +5% | - | 16 | 6 months ago | ESM + CommonJS | Bundled | - |
| drizzle-kit | 13.6m | +754% | - | 4 | 3 days ago | ESM + CommonJS | Bundled | - |
| drizzle-zod | 2.2m | +212% | - | 0 | 1 year ago | ESM + CommonJS | Bundled | - |
| drizzle-seed | 234.2k | +246% | - | 1 | 1 year ago | ESM + CommonJS | Bundled | - |
| sql-template-tag | 62.6k | +48% | - | 0 | 2 years ago | ESM only | Bundled | - |
| kysely-postgres-js | 129.6k | +337% | - | 0 | 9 days ago | ESM only | Bundled | - |
12-month change compares the average of the last 4 weeks of downloads with the first 4 weeks of the 52-week series. Gzip size is for the whole package (Bundlephobia). Runtimes are taken from each package's own documentation; "-" means not recorded.
Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.
Compared with knex
- 3.1x more weekly downloads (11.8m vs 3.8m)
- 1 dependency vs 14
- ESM + CommonJS vs CommonJS
- Declares Node.js ^20.19 || ^22.12 || >=24.0 vs Node.js >=16
- Last release 25 Aug 2026 vs 26 Jun 2026
- 2.3x more GitHub stars (47.7k vs 20.3k)
Type safe SQL query builder
Compared with knex
- 3.2x more weekly downloads (12m vs 3.8m)
- 0 dependencies vs 14
- ESM only vs CommonJS
- No types vs bundled types
- Declares Node.js >=22.0.0 vs Node.js >=16
- Last release 16 Sept 2026 vs 26 Jun 2026
- 1.4x fewer GitHub stars (14.2k vs 20.3k)
Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Amazon Redshift and Snowflake’s Data Cloud. It features solid transaction support, relations, eager and lazy loading, read replication and more.
Compared with knex
- 1.9x fewer weekly downloads (2m vs 3.8m)
- 16 dependencies vs 14
- ESM + CommonJS vs CommonJS
- Declares Node.js >=10.0.0 vs Node.js >=16
- Last release 7 Mar 2026 vs 26 Jun 2026
- 1.5x more GitHub stars (30.4k vs 20.3k)
Drizzle Kit is a CLI migrator tool for Drizzle ORM. It is probably the one and only tool that lets you completely automatically generate SQL migrations and covers ~95% of the common cases like deletions and renames by prompting user input. <https://github
Compared with knex
- 3.6x more weekly downloads (13.6m vs 3.8m)
- 4 dependencies vs 14
- ESM + CommonJS vs CommonJS
- Declares no Node.js engine range vs Node.js >=16
- Last release 21 Sept 2026 vs 26 Jun 2026
- 1.8x more GitHub stars (35.9k vs 20.3k)
Generate Zod schemas from Drizzle ORM schemas
Compared with knex
- 1.7x fewer weekly downloads (2.2m vs 3.8m)
- 0 dependencies vs 14
- ESM + CommonJS vs CommonJS
- Declares no Node.js engine range vs Node.js >=16
- Last release 6 Aug 2025 vs 26 Jun 2026
- 1.8x more GitHub stars (35.9k vs 20.3k)
A package to seed your database using Drizzle ORM
Compared with knex
- 16x fewer weekly downloads (234.2k vs 3.8m)
- 1 dependency vs 14
- ESM + CommonJS vs CommonJS
- Declares no Node.js engine range vs Node.js >=16
- Last release 29 Jan 2025 vs 26 Jun 2026
- 1.8x more GitHub stars (35.9k vs 20.3k)
ES2015 tagged template string for preparing SQL statements, works with `pg`, `mysql`, `sqlite` and `oracledb`
Compared with knex
- 60x fewer weekly downloads (62.6k vs 3.8m)
- 0 dependencies vs 14
- ESM only vs CommonJS
- Declares Node.js >=14 vs Node.js >=16
- Last release 20 Apr 2024 vs 26 Jun 2026
- 52x fewer GitHub stars (393 vs 20.3k)
Kysely dialect for PostgreSQL using the Postgres.js client
Compared with knex
- 29x fewer weekly downloads (129.6k vs 3.8m)
- 0 dependencies vs 14
- ESM only vs CommonJS
- Declares Node.js >=22 vs Node.js >=16
- Last release 16 Sept 2026 vs 26 Jun 2026
- 142x fewer GitHub stars (143 vs 20.3k)
Indexability: Indexed.