Stack Picker
a developer-grade decision engine
Back to the picker
ORM / Query Layer

Kysely

Type-safe SQL query builder — no ORM magic.

Official site
Monthly cost
Free
Popularity
3/5
LLM knowledge
3/5
Difficulty
Medium
#edge#typescript#open-source

What Kysely is good at

Strengths
  • +Fully type-safe SQL
  • +Tiny
  • +No schema file
Tradeoffs
  • You write SQL yourself
  • No migrations out of box

Coding-agent prompt

You're working with Kysely. Type-safe SQL query builder — no ORM magic.

Best practices:
- Lean on: fully type-safe sql
- Lean on: tiny
- Lean on: no schema file

Things to watch for:
- Watch out for: you write sql yourself
- Watch out for: no migrations out of box

General guidance:
- Canonical docs: https://kysely.dev — check here before inventing APIs.
- Keep secrets in environment variables, never commit them.
- Write TypeScript where the ecosystem supports it; add types to every exported function.
- Add tests for the critical paths before declaring the task done.
- Read-the-docs is usually faster than guessing — cite the docs page in code comments when you apply a non-obvious pattern.

Beginner's guide to Kysely

In one line: A type-safe SQL query builder — you write SQL, it makes sure your types match.

Kysely isn't a full ORM — it's just a typed SQL builder. If you know SQL and like it, Kysely adds safety without abstraction.

Browse all categories