# RobinBlomberg/kysely-codegen

Generate Kysely type definitions from your database.

Repository: https://github.com/RobinBlomberg/kysely-codegen
Canonical: https://ross.abutalabs.com/products/kysely-codegen
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-02-16T08:46:43+00:00

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

## Adoption (not part of the score)
Stars 1230, forks 143 (observed 2026-08-28T04:04:03.640605+00:00)

## What it is
A CLI tool that generates Kysely TypeScript type definitions by introspecting your database schema. It supports PostgreSQL, MySQL, SQLite, MSSQL, and LibSQL, outputting a .d.ts file for type-safe query building.

## Use cases
- generate kysely types from database schema
- create typescript type definitions for sql database
- type-safe database queries with kysely
- introspect postgres schema into typescript types
- generate db types for mysql or sqlite
- keep database types in sync with schema

## When to choose
- you use Kysely and want type-safe queries without hand-writing interfaces
- your database schema changes often and you want to regenerate types
- you want a simple, focused codegen tool with multi-database support

## When to avoid
- you use an ORM other than Kysely (e.g. Prisma, Drizzle have their own codegen)
- you need runtime schema validation rather than compile-time types
- you don't use TypeScript

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, database, orm, type-system, developer-tools
- domain: databases, developer-tools, backend, web-development
- platform: cli, cross-platform
- tags: kysely, typescript, code-generation, sql, type-definitions, schema-introspection, nodejs

## Member repositories
- RobinBlomberg/kysely-codegen (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:03.640605+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-30T08:22:33.718983+00:00, confidence not recorded.
  - readme: https://github.com/RobinBlomberg/kysely-codegen (fetched 2026-08-28T04:04:03.640605+00:00, sha 563094303868)
  - registry_npm: https://registry.npmjs.org/kysely-codegen (fetched 2026-08-29T12:22:14.391617+00:00, sha 09ac73e411e1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
