# kysely-org/kysely

A type-safe TypeScript SQL query builder

Repository: https://github.com/kysely-org/kysely
Canonical: https://ross.abutalabs.com/products/kysely
Homepage: https://kysely.dev
Language: TypeScript
License: MIT
License Family: permissive
Topics: typescript, database, postgresql, mysql, sqlite, query-builder, type-safe, sql, nodejs, deno, browser, bun, microsoft-sql-server, mssql
Last push: 2026-08-26T07:46:10+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 2018, "days_push": 7, "days_rel": 24, "gap_med": 13, "n_releases_24m": 26}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 14168, forks 435 (observed 2026-08-28T04:11:05.710272+00:00)

## What it is
Kysely is a type-safe, autocompletion-friendly SQL query builder for TypeScript, inspired by Knex. It supports PostgreSQL, MySQL, MSSQL, and SQLite, and runs on Node.js, Deno, Bun, workers, and browsers with zero runtime dependencies.

## Use cases
- build type-safe SQL queries in TypeScript
- catch invalid table and column references at compile time
- compose reusable query fragments, subqueries, and CTEs
- query PostgreSQL, MySQL, SQLite, or MSSQL from Node.js
- get autocompletion for table and column names
- migrate queries safely when the database schema changes

## When to choose
- you want compile-time safety for SQL without a full ORM
- your team uses TypeScript with strict mode and values precise result types
- you need a lightweight query builder with zero runtime dependencies
- you want Knex-like ergonomics with much stronger typing

## When to avoid
- you need a full ORM with relations DSL, migrations, and entity management out of the box
- your project is plain JavaScript without TypeScript
- you prefer writing raw SQL strings exclusively

## Facets
- artifact type: library
- maturity: stable
- function: database, orm, developer-tools
- domain: databases, web-development, backend, developer-tools
- platform: bun, browser, cross-platform
- tags: sql-query-builder, type-safe, query-builder, postgresql, mysql, sqlite, mssql, knex-inspired, nodejs, deno, typescript

## Member repositories
- kysely-org/kysely (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:05.710272+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:12:45.582144+00:00, confidence not recorded.
  - readme: https://github.com/kysely-org/kysely (fetched 2026-08-28T04:11:05.710272+00:00, sha 1c4c0ba6daa8)
  - homepage: https://kysely.dev (fetched 2026-08-29T08:06:43.155459+00:00, sha 5efaa8aefc7e)
  - site_page: https://kysely.dev/docs/intro (fetched 2026-08-29T08:06:43.165716+00:00, sha 9c4d1ac5416d)
  - site_page: https://kysely.dev/docs/getting-started (fetched 2026-08-29T08:06:43.168125+00:00, sha dba4c8c4afa7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
