Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

kysely

> 数据库
Open source

A type-safe TypeScript SQL query builder

14.1K stars0 likes1 views
WebsiteGitHub

About

A type-safe TypeScript SQL query builder

###### Join the discussion ⠀⠀⠀⠀⠀⠀⠀ ###### Get started & more! # [Kysely](https://kysely.dev) Kysely (pronounce “Key-Seh-Lee”) is a type-safe and autocompletion-friendly [TypeScript](https://www.typescriptlang.org/) [SQL](https://en.wikipedia.org/wiki/SQL) query builder. Inspired by [Knex.js](http://knexjs.org/). Mainly developed for [Node.js](https://nodejs.org/en/) but also runs on all other [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) environments like [Deno](https://deno.com/), [Bun](https://bun.sh/), [Cloudflare Workers](https://workers.cloudflare.com/) and web browsers. Kysely makes sure you only refer to tables and columns that are visible to the part of the query you're writing. The result type only has the selected columns with correct types and aliases. As an added bonus you get autocompletion for all that stuff. As shown in the gif above, through the pure magic of modern TypeScript, Kysely is even able to parse the alias given to `pet.name` and add the `pet_name` column to the result row type. Kysely is able to infer column names, aliases and types from selected subqueries, joined subqueries, `with` statements and pretty much anything you can think of. Of course there are cases where things cannot be typed at compile time, and Kysely offers escape hatches for these situations. See the [sql template tag](https://kysely-org.github.io/kysely-apidoc/interfaces/Sql.html) and the [DynamicModule](https://kysely-org.github.io/kysely-apidoc/classes/DynamicModule.html#ref) for more info. All API documentation is written in the typing files and you can simply hover over the module, class or method you're using to see it in your IDE. The same documentation is also hosted [here](https://kysely-org.github.io/kysely-apidoc/). If you start using Kysely and can't find something you'd want to use, please open an issue or join our [Discord server](https://discord.gg/xyBJ3GwvAm). # Getting started Please visit our documentation site [kysely.dev](https://kysely.dev) to get started. We also have a comprehensive API documentation hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation in your IDE by hovering over a class/method/property/whatever. # Core team ## Project leads Responsible for project direction, API design, maintenance, code reviews, community support, documentation, and working on some of the most impactful/challenging things.

Sami Koskimäki

(the author)

Igal Klebanov

(the dynamo)
## Honorable mentions People who had special impact on the project and its growth.

Fernando Hurtado

(1st docs)

Wirekang

(playground)

Tim Griesser

(Knex)

Robin Blomberg

(codegen)

Shoubhit Dash

(prisma idea)

Valtýr Örn Kjartansson

(prisma impl)

Dax Raad

(early adopter)

Theo Browne

(early promoter)

Lee Robinson

(early promoter)

Ethan Resnick

(timely feedback)

Harminder Virk

(dope writeup)

Johan Eliasson

(promoter/educator)
## All contributors


Want to contribute? Check out our contribution guidelines.

Issues· 180 open

View all issuesOpen on GitHub
  • #2084

    PostgresDriver: destroy() hangs forever when called while a connection is being acquired

    postgresbuilt-in dialectUpdated Sep 30, 2026
  • #2082

    add query pipelining support.

    enhancementcustom dialectpostgresbuilt-in dialectinternalUpdated Sep 28, 2026
  • #320

    Are you using Kysely in production? Let us know!

    documentationquestionUpdated Sep 23, 2026
  • #1990

    ControlledTransaction leaks the pooled connection when beginTransaction, commitTransaction or rollbackTransaction throws

    internalUpdated Sep 16, 2026
  • #1603

    `eb.case`'s `then`, `thenRef`, `else` and `elseRef` might be too permissive.

    bugpostgresapitypescriptUpdated Sep 15, 2026
  • #985

    Incorrect type when using left join and json agg (postgres)

    postgrestypescriptUpdated Sep 12, 2026
  • #2012

    Feature request - ON CONFLICT DO SELECT

    enhancementpostgresapiUpdated Sep 8, 2026
  • #2009

    `SelectFrom`, `UpdateTable` exports for `tsconfig - "declaration": true`

    Updated Sep 6, 2026
  • #1832

    Support `not valid` check constraint clause.

    enhancementpostgresapiUpdated Aug 25, 2026
  • #959

    Merge temp table as source table

    questionapimssqlUpdated Aug 25, 2026

> Tags

TypeScriptbrowserbundatabasedeno

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库