
Kysely
Type-safe TypeScript SQL query builder
The Lens
Kubernetes orchestrates containers across clusters of machines: scheduling, scaling, networking, storage, self-healing, all declaratively configured. It's not an ORM. It doesn't hide SQL behind methods. You write actual SQL, and TypeScript validates every piece of it.
The difference from Prisma or Drizzle: Kysely doesn't generate SQL from a schema file or provide an abstraction layer. You write SQL directly using a builder pattern, and the type system ensures it's correct. If a column doesn't exist on a table, TypeScript errors. If you try to compare a string column to a number, TypeScript errors. It's SQL with a safety net.
Completely free under MIT. No paid tier, no cloud service. It supports Postgres, MySQL, SQLite, and has community dialects for others. Drizzle ORM is the closest alternative, also type-safe, but with a more ORM-like API and built-in migrations. Prisma is easier to start with but generates heavier queries and has a larger runtime footprint.
The catch: the learning curve is steeper than Prisma. You need to understand SQL and TypeScript generics. Schema changes require manual type updates (or a code generator). It doesn't handle migrations; you'll need a separate tool. And because it's closer to raw SQL, it's more code to write than Prisma's concise API.
Free vs Self-Hosted vs Paid
fully free### Pricing Breakdown
**Free tier:** Everything. MIT licensed, no restrictions. Full query builder, all dialects, all features.
**Self-hosted:** N/A. It's a TypeScript library. Install via npm and import. Zero infrastructure.
**Comparison to alternatives:** - Drizzle ORM: Free (Apache 2.0). Type-safe with ORM features + migrations. Drizzle Studio for visual DB browsing. Most direct competitor - Prisma: Free open source, Prisma Accelerate (connection pooling/caching) starts at $0 with usage-based pricing. Easier to learn but heavier runtime - Knex.js: Free (MIT). The original JS query builder. Not type-safe but battle-tested - TypeORM: Free (MIT). Full ORM with decorators. Less type-safe than Kysely or Drizzle
**The real cost:** All the alternatives are free. The choice is about developer experience and SQL philosophy, not price. Kysely is for teams that want to write SQL and have TypeScript verify it. Drizzle is for teams that want type-safety with more convenience. Prisma is for teams that want to think less about SQL entirely.
Completely free. Choose based on how close to raw SQL you want to be, not price.
Similar Tools
About
- Stars
- 13,648
- Forks
- 395
Explore Further
More tools in the directory
Get tools like this delivered weekly
The Open Source Drop — the best new open source tools, analyzed. Free.


