
Kysely
Type-safe SQL query builder for TypeScript whose result types follow the selected columns.
Kysely is a SQL query builder for TypeScript. Queries are method chains over typed table definitions, and the compiler checks that each table and column a query refers to is in scope where it is written. A result’s type has only the selected columns, with their aliases, and it follows subqueries, joins and common table expressions. Each database is reached through a dialect, which usually needs its database driver library as a peer dependency. The library is mainly developed for Node.js and also runs on Deno, Bun, Cloudflare Workers and in web browsers.
Worth knowing
Kysely deals with types only at the TypeScript level, so the values a driver returns at runtime are not changed, and the database interface has to match the schema. For queries the types cannot express, the README points to an sql template tag and a DynamicModule class.
Identity
Rendering and deploy
- Install with
- npm, deno add (JSR)3
Releases
Adoption
Sources
- 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/kysely-org/kysely - 2026-11-16: links, Categories
kysely.dev/ - 2026-11-16: links, Databases, Install with
kysely.dev/docs/getting-started - 2026-11-16: Maintainer, License, License model
raw.githubusercontent.com/kysely-org/kysely/master/LICENSE - 2026-11-16: Runtime
github.com/kysely-org/kysely/blob/master/README.md - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/kysely - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/kysely - 2026-11-16: First release
registry.npmjs.org/kysely - 2026-11-16: Current major version, Last release
api.github.com/repos/kysely-org/kysely/releases - 2026-11-16: Contributors
api.github.com/repos/kysely-org/kysely/contributors?per_page=1