aicoolies logo
Kysely logo
Kysely logo

Kysely

Type-safe SQL query builder for TS

open sourceupdated May 24, 2026

Type-safe SQL query builder for TypeScript that provides auto-completion and compile-time type checking without the abstraction overhead of a traditional ORM. Write queries that map directly to SQL while getting full TypeScript inference from your database schema. Supports PostgreSQL, MySQL, and SQLite with migrations, transactions, and raw SQL escape hatches. Lightweight with zero dependencies. Ideal for developers who want SQL control with TypeScript safety. Growing Knex.js alternative.

Kysely is a type-safe TypeScript SQL query builder that provides unparalleled autocompletion and compile-time safety for database queries. Inspired by Knex.js but built from the ground up with TypeScript in mind, Kysely ensures that you can only reference tables and columns that actually exist in your database schema, catching errors before your code ever runs. It runs on Node.js, Deno, Bun, Cloudflare Workers, and web browsers, making it a versatile choice for modern JavaScript runtimes.

Kysely stands out as a thin abstraction layer over SQL, designed by SQL enthusiasts who want predictable one-to-one query compilation rather than magical ORM behavior. It provides smart column inference that restricts field access to only the columns visible in each part of a query, ensuring result types include only selected columns with correct types and aliases. Kysely supports the full range of SQL operations including SELECT, INSERT, UPDATE, DELETE, MERGE, WITH clauses, and complex subqueries, all with complete type safety and autocompletion support.

Kysely is targeted at TypeScript developers and teams proficient in SQL who want the safety of type checking without sacrificing control over their queries. It is used in production by companies like Deno, Maersk, and Cal.com, demonstrating its readiness for enterprise workloads. Kysely integrates with PostgreSQL, MySQL, and SQLite through dialect-specific drivers, and its plugin system allows extending functionality with custom transformations, making it an excellent choice for projects where type safety and SQL familiarity are top priorities.

Pricing

Free

Platforms

Node.js, Deno, Bun

Categories

Tags

Use Cases

Related Tools

computed discovery: shared active categories · kept separate from editor-verified Alternatives

Cloudflare logo

Cloudflare Vectorize

Edge-native vector database for Workers and AI applications

Cloudflare Vectorize is Cloudflare’s managed vector database for Workers and edge AI applications. It is distinct from the existing Cloudflare Workers tool page: Workers is the compute runtime, while Vectorize is the embedding index and vector-query layer used to add semantic retrieval to Cloudflare-hosted apps.

freemium
Upstash Vector logo

Upstash Vector

Serverless vector database with pay-as-you-go API pricing

Upstash Vector is a managed serverless vector database for RAG, semantic search, and embedding lookup. It is separate from the existing Upstash platform record in the aicoolies catalog: this slug covers the Vector product line, not the broader Redis, Kafka, or QStash platform.

freemium
OpenSearch logo

OpenSearch

Open-source search engine with vector and hybrid retrieval

OpenSearch is an Apache-2.0 distributed search engine with native vector-search support for teams that want BM25, filters, aggregations, and k-NN retrieval in the same search stack. It is distinct from Elasticsearch in the aicoolies catalog: OpenSearch is the AWS-backed open fork with its own docs, plugin path, and serverless deployment options.

Open Source
Deep Lake logo

Deep Lake

AI data runtime for multimodal datasets and vector search

Deep Lake is an open-source AI data runtime from Activeloop for storing, versioning, and querying multimodal data and embeddings. It fits teams building RAG, training, evaluation, or dataset-heavy agent workflows that need a bridge between vector search, structured metadata, and large image, text, audio, or video collections.

Open Source
SeekDB logo

SeekDB

AI-native state store with hybrid vector and full-text search

SeekDB is an open-source AI-native state store from the OceanBase ecosystem that combines MySQL-compatible data access with hybrid vector and full-text retrieval. It targets agent and AI application teams that need embedded or server deployment, copy-on-write style sandboxes, and searchable state without gluing together several separate storage layers.

Open Source
TigerData logo

pgvectorscale

DiskANN-powered vector search extension for PostgreSQL

pgvectorscale is an open-source PostgreSQL extension from Timescale that complements pgvector with DiskANN-based approximate vector search. It is useful for teams that want faster embedding retrieval while keeping vectors, filters, and application data inside the Postgres ecosystem instead of adopting a separate hosted vector database.

Open Source

FAQ

What is Kysely?

Type-safe SQL query builder for TypeScript that provides auto-completion and compile-time type checking without the abstraction overhead of a traditional ORM. Write queries that map directly to SQL while getting full TypeScript inference from your database schema. Supports PostgreSQL, MySQL, and SQLite with migrations, transactions, and raw SQL escape hatches. Lightweight with zero dependencies. Ideal for developers who want SQL control with TypeScript safety. Growing Knex.js alternative.

Is Kysely free?

Yes — Kysely is open source and free to use. Free

Is Kysely open source?

Yes — Kysely is open source.

What are the best Kysely alternatives?

The top editor-verified Kysely alternatives are Knex.js, TypeORM, Sequelize.