Elestia Open Source Ratings
8.0

Kysely

A strong pick. 2nd of 10 ORMs and query builders.

Kysely is a zero-dependency, type-safe SQL query builder for TypeScript. It stays close to SQL and is among the most precisely typed options. It is a strong pick for teams that know SQL and do not want an ORM's modelling layer, but it has no schema-first models and does not generate migrations, and it is still on 0.x versions.

Best for: TypeScript teams that write real SQL and want full type inference without an ORM, on Postgres, MySQL, SQLite, MSSQL or edge runtimes.

WebsiteGitHubnpm

Scores

Overall8.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.5, likely 6.5 to 8.0

Kysely is the best pure type-safe query builder in the category, and it is very active and growing fast. Drizzle is still the broader default for most new projects because it adds a schema layer and migration generation. Kysely's 0.x breaking changes and this year's injection advisories keep it below the top tier. It is a strong pick for SQL-first teams.

GPT-6.2 Sol: 8.4, likely 7.3 to 9.3

Kysely is a strong first choice for explicit SQL in a new TypeScript project, especially when complex queries and result inference matter. It offers stronger query typing than Knex, while Prisma and Drizzle suit teams that want schema and relation tooling in one package. Active maintenance and downstream adoption support the recommendation, with some uncertainty from release concentration, upgrade friction, and the difficulty of measuring direct adoption.

Needed by many6.7

How many developers need a tool for this job?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Reading and writing SQL databases is needed in most backend and full-stack JS projects. Kysely serves the SQL-database share and leaves out MongoDB. Its SQL-first, non-ORM approach appeals most to developers who are comfortable with SQL.

GPT-6.2 Sol: 6.4, likely 5.2 to 7.5

Kysely covers the major relational databases and works across Node.js, Bun, Deno, and edge runtimes with suitable drivers. Its strongest fit is strict TypeScript with explicit SQL, which narrows the audience to one part of the database-tool market. The survey establishes demand for the databases it supports, while the share of JavaScript and TypeScript developers who want this query style is harder to estimate.

Helps a lot8.4

How well does it do the job for those who need it?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

Type inference and SQL expressiveness are among the best in the category, and it supports many dialects with zero dependencies. Recent releases added query cancellation and a PGlite dialect. It loses points for having no ORM modelling layer and no migration generation, which Drizzle and Prisma provide. Filters can also get verbose.

GPT-6.2 Sol: 8.7, likely 7.6 to 9.6

Kysely combines precise result inference with composable SQL and practical escape hatches for complex queries. A recent third-party PostgreSQL benchmark showed competitive performance on its tested workloads. Users report confusing type errors on complex queries, and schema synchronization takes extra tooling. Worked examples and compiler feedback help coding agents, though agent success rates and performance across dialects are still uncertain.

Holds up over time7.4

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Activity is high: 430 commits and 26 releases in the last year, a patch on 2026-11-12, and about 1,000 issues closed. The 0.28 line is still maintained next to 0.29. Two co-leads carry the core work as volunteers with no clear corporate funding, and the 0.x versions mean minor releases can break code. Downstream use by Better Auth and ZenStack makes it more likely to keep going.

  • github commitsLastYear / releasesLastYear: 430 commits, 26 releases
  • github latestRelease: v0.29.9 on 2026-11-12
  • issoh.co.jp/tech/details/19069: 0.29 is ESM-only and needs Node 22; 0.28 maintained separately
  • maintainers: Core is led by Sami Koskimäki and Igal Klebanov, community-funded

GPT-6.2 Sol: 7.7, likely 6.3 to 8.6

The repository logged 430 commits and 26 GitHub releases in a year, and maintainers backported fixes to the 0.28 line. MikroORM's switch from Knex to Kysely gives it another established downstream user. The team maintains it in its spare time, npm lists two maintainers, and recent GitHub releases largely come from one account. The 0.29 import changes and a reported production disruption after a 0.28 patch widen the range.

Used widely5.9

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Downloads rose about 22x in a year, to 118M per 4 weeks, far above the 4.1 median. Much of that comes through transitive installs, mainly Better Auth's built-in adapter and ZenStack. Direct use is smaller: 1,155 dependent repos, against 2,870 for Drizzle and 43,615 for Prisma. Still, the trend in direct choice is clearly upward.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 117.9M vs 5.2M, about 22.6x ratio
  • dependents: 1,155 repos and 193 packages, below Drizzle and Prisma
  • intel.aikido.dev/packages/npm/better-auth: better-auth depends on kysely, which inflates downloads
  • github stars: 14.4k stars

GPT-6.2 Sol: 4.8, likely 3.3 to 6.1

Four-week npm downloads grew 22.6× year over year, well above the 4.1× catalog median and slightly ahead of Drizzle's 19.1×. Ecosyste.ms found 1,155 dependent repositories, below Drizzle and far below Prisma and Knex. Kysely has 14,373 stars and more Bluesky links than most peers, though maintainers account for several top posts. Better Auth, MikroORM, and CI generate installs that make direct adoption and its growth hard to isolate.

  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, and medianDownloadsRatio: 117.9 million installs versus 5.2 million a year earlier, against a 4.1× baseline.
  • dependents and peers: 1,155 repositories and 193 packages found, versus 2,870 repositories for Drizzle and 43,615 for Prisma.
  • github stars and bluesky: 14,373 stars and 13 Bluesky links, with several top posts from project accounts.
  • github.com/better-auth/better-auth/discussions/9730: A Prisma user reports receiving Kysely through Better Auth.
  • mikro-orm.io/blog/mikro-orm-7-released: MikroORM installs Kysely for SQL execution.
Vouched for7.6

Who stands behind it being good?

Claude Opus 5.5: 7.0, likely 5.0 to 8.0

Popular frameworks have chosen it as their engine: Better Auth runs its SQL adapters on it, and ZenStack v3 rewrote its ORM engine on it. Independent write-ups praise its type safety. It has no survey satisfaction data we could confirm, and most comparison articles are thin or written by vendors.

GPT-6.2 Sol: 8.2, likely 7.1 to 9.1

MikroORM 7 uses Kysely to execute SQL, Better Auth uses its dialects, and the U.S. Tax Court uses it in its case-management code. A developer also documented moving a production application from Prisma to Kysely after using it for complex reporting queries. These are distinct commitments, while the satisfaction evidence comes from individual reports.

Safe7.2

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 5.0 to 8.0

It has zero runtime dependencies, an MIT licence, and a Scorecard of 7.3 with good workflow hygiene. Four high-severity SQL injection advisories came out in 2026, all in sql.lit and JSON-path APIs or in untyped use, and all were patched. One fix in 0.28.12 was incomplete and needed a later patch. Code-Review scores 0, and there is no fuzzing.

GPT-6.2 Sol: 7.3, likely 6.0 to 8.4

The MIT-licensed core has zero runtime dependencies, and the tagged npm workflow uses OIDC and staged publishing. Version 0.29.9 contains fixes for all five upstream advisories, including a moderate SQL Server issue missing from the supplied feed that was patched before disclosure. Follow-up advisories exposed gaps in earlier JSON-path fixes. OpenSSF Scorecard gives strong marks for CI and token permissions, with zero scores for code review and fuzzing.

Good

  • Typing for joins, subqueries and selected columns is very precise, and result types are inferred with no codegen at runtime.
  • It has zero dependencies, a small bundle, and runs on Node, Deno, Bun, browsers and edge runtimes through many dialects.
  • Code reads like SQL, so you learn little new API and the queries are easy to check.
  • Well-known tools build on it, including Better Auth and the ZenStack v3 engine, and kysely-codegen keeps types in sync with the database.

Bad

  • It is not an ORM: there are no declarative models, no relation loading, and migrations are not generated.
  • It is still 0.x, and minor releases break things: 0.29 went ESM-only and moved the migration exports.
  • Four high-severity SQL injection advisories came out in 2026, in the raw-literal and JSON-path APIs.
  • A small volunteer core team handles releases, and code review is not enforced on every change.

The numbers

npm downloads, 4 weeks
118M ×23 in a year
GitHub stars
14k
Commits, 12 months
430
npm version
0.29.9 Nov 2026
Versions, 12 months
22
Advisories, 24 months
4 of 4 ever
OpenSSF Scorecard
7.3 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (kysely-org/kysely), npm (kysely), OSV and the OpenSSF Scorecard.

ORMs and query builders

  1. 8.1Drizzle ORM
  2. 8.0Kysely
  3. 7.8Mongoose
  4. 7.5Prisma
  5. 7.3MikroORM
  6. 6.7ZenStack
  7. 6.4TypeORM
  8. 5.9Knex.js
  9. 5.3Objection.js
  10. 5.0Sequelize
Compare all 10 on six scores