finds.dev

valtyr/prisma-kysely

🪄 Generate Kysely types directly from your Prisma schema!

View on GitHubHomepage ↗

★ 1,186TypeScriptMITupdated Oct 2026

// the take

A Prisma generator that reads your schema.prisma and spits out Kysely table types, so you keep Prisma's migration workflow and schema DX but query with Kysely's type-safe SQL builder instead of the Prisma Client. It's for teams who hit the wall where Prisma Client's query API is too restrictive but don't want to give up Prisma's migrations for raw kysely-codegen introspection.

Field-level overrides via @kyselyType docstring annotations and a dbTypeName/typeOverride config give you real escape hatches when the generated type is wrong, not just an all-or-nothing mapping. Multi-schema support is genuinely built out — groupBySchema handles both namespaced and per-file module output, which is more than most Prisma generators bother with. The camelCase option mirrors Kysely's CamelCasePlugin behavior exactly, including the upperCase edge case for ALL_CAPS columns, so generated types won't silently mismatch runtime key transforms. It ships dialect-specific test suites (mysql/postgresql/sqlite) plus e2e tests rather than just unit-testing the type generation in isolation.

Postgres enum arrays are typed as plain string by default because the pg driver returns raw array literals unless you register a type parser yourself — easy to miss and you'll find out at runtime, not compile time. uuid()/cuid() defaults are JS-side in Prisma, so they don't actually exist as DB defaults; you're pushed into dbgenerated() workarounds just to get a real default value, which means the generator's output can quietly diverge from what your schema.prisma implies. The groupBySchema true/false/"module" tri-state is already flagged for removal in the next major version, so multi-schema users adopting it now are building on an API that's about to change shape. Per-field type overrides come with zero runtime validation — the README admits this outright — so a typo'd override just produces wrong types with no safety net.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
1,186
Forks
43
Language
TypeScript
License
MIT
Last commit
1 Oct 2026

// nearby

If prisma-kysely isn't quite it.

All repos →