# valtyr/prisma-kysely

🪄 Generate Kysely types directly from your Prisma schema!

Repository: https://github.com/valtyr/prisma-kysely
Canonical: https://ross.abutalabs.com/products/prisma-kysely
Homepage: https://www.npmjs.com/package/prisma-kysely
Language: TypeScript
License: MIT
License Family: permissive
Topics: generator, kysely, prisma, d1
Last push: 2026-08-16T07:18:11+00:00

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

## Adoption (not part of the score)
Stars 1184, forks 43 (observed 2026-08-28T04:03:54.783847+00:00)

## What it is
A Prisma generator plugin that produces fully typed Kysely database types directly from your Prisma schema. It lets you keep Prisma's migration and schema workflow while writing type-safe SQL queries with Kysely instead of the Prisma Client.

## Use cases
- generate kysely types from prisma schema
- use prisma migrations with kysely queries
- write type-safe raw SQL with prisma schema
- replace prisma client with kysely
- generate database types for cloudflare d1
- get typescript types for sql queries from prisma

## When to choose
- you like Prisma's schema language and migration flow but find the Prisma Client too limiting
- you need multi-table joins or raw SQL performance without losing type safety
- you're targeting Cloudflare D1 or other databases where Kysely is preferred

## When to avoid
- you're happy with the Prisma Client's query API
- you don't use Prisma for schema management or migrations
- you need runtime query building rather than type generation

## Facets
- artifact type: library
- maturity: active
- function: orm, database, sdk, developer-tools
- domain: databases, developer-tools, web-development, backend
- platform: cli
- tags: prisma, kysely, codegen, sql, type-generation, cloudflare-d1, nodejs, typescript

## Member repositories
- valtyr/prisma-kysely (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.783847+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-30T06:24:29.902857+00:00, confidence not recorded.
  - readme: https://github.com/valtyr/prisma-kysely (fetched 2026-08-28T04:03:54.783847+00:00, sha f9a2a38ffe6b)
  - registry_npm: https://registry.npmjs.org/prisma-kysely (fetched 2026-08-29T12:31:21.635875+00:00, sha 5c5fb5a088e4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
