# Kysely

Type-safe SQL query builder for TypeScript whose result types follow the selected columns.


Source: https://findsoftware.frbit.cloud/kysely/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://kysely.dev
- repository: https://github.com/kysely-org/kysely
- docs: https://kysely.dev/docs/getting-started
- bluesky: https://bsky.app/profile/kysely.dev
- discord: https://discord.gg/xyBJ3GwvAm

### Identity

- status: active
- maintainer: Sami Koskimäki
- maintainerType: unknown
- parent: unknown
- firstRelease: 2021
- hqCountry: unknown

### Kind

- category: library
- hosting: node, deno, bun
- language: javascript
- runtime: node, deno, bun
- runtimeMin: unknown
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: postgres, mysql, sqlserver, sqlite
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: npm, deno add (JSR)

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 0
- latestReleaseDate: 2026-11-12

### Adoption

- githubStargazers: 14355
- packagistDownloads: not applicable
- npmWeeklyDownloads: 29144397
- contributors: 161
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 1155
- dependentPackages: 193

### Sources

- urls: https://api.github.com/repos/kysely-org/kysely (read 2026-11-16)
- urls: https://kysely.dev/ (read 2026-11-16)
- urls: https://kysely.dev/docs/getting-started (read 2026-11-16)
- maintainer: https://raw.githubusercontent.com/kysely-org/kysely/master/LICENSE (read 2026-11-16)
- language: https://api.github.com/repos/kysely-org/kysely (read 2026-11-16)
- category: https://kysely.dev/ (read 2026-11-16)
- runtime: https://github.com/kysely-org/kysely/blob/master/README.md (read 2026-11-16)
- databases: https://kysely.dev/docs/getting-started (read 2026-11-16)
- installMethod: https://kysely.dev/docs/getting-started (read 2026-11-16)
- installMethod: https://kysely.dev/docs/getting-started (read 2026-11-16)
- license: https://raw.githubusercontent.com/kysely-org/kysely/master/LICENSE (read 2026-11-16)
- licenseModel: https://raw.githubusercontent.com/kysely-org/kysely/master/LICENSE (read 2026-11-16)
- npmWeeklyDownloads: https://api.npmjs.org/downloads/range/2026-11-01:2026-11-07/kysely (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/kysely (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/kysely (read 2026-11-16)
- firstRelease: https://registry.npmjs.org/kysely (read 2026-11-16)
- currentMajor: https://api.github.com/repos/kysely-org/kysely/releases (read 2026-11-16)
- latestReleaseDate: https://api.github.com/repos/kysely-org/kysely/releases (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/kysely-org/kysely (read 2026-11-16)
- contributors: https://api.github.com/repos/kysely-org/kysely/contributors?per_page=1 (read 2026-11-16)

## Notes

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.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
