Skip to content
JS
Alternatives

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.

Data as of 25 Sept 2026
PackageWeekly downloads12-month changeGzipDependenciesLast releaseModuleTypesRuntimes
knex
This package
3.8m+74%-142 months agoCommonJSBundled-
@prisma/client11.8m+235%-130 days agoESM + CommonJSBundled-
kysely12m+1153%-09 days agoESM onlyNone-
sequelize2m+5%-166 months agoESM + CommonJSBundled-
drizzle-kit13.6m+754%-43 days agoESM + CommonJSBundled-
drizzle-zod2.2m+212%-01 year agoESM + CommonJSBundled-
drizzle-seed234.2k+246%-11 year agoESM + CommonJSBundled-
sql-template-tag62.6k+48%-02 years agoESM onlyBundled-
kysely-postgres-js129.6k+337%-09 days agoESM onlyBundled-

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)
Sources: npm registry, npm downloads API, GitHub API, Bundlephobia. Data fetched 25 Sept 2026.

Indexability: Indexed.