# kristiandupont/kanel

Generate Typescript types from Postgres

Repository: https://github.com/kristiandupont/kanel
Canonical: https://ross.abutalabs.com/products/kanel
Homepage: https://kristiandupont.github.io/kanel/
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-26T13:53:59+00:00

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

## Adoption (not part of the score)
Stars 1173, forks 79 (observed 2026-08-28T04:03:51.774853+00:00)

## What it is
Kanel is a code generation tool that connects to a live PostgreSQL database and generates TypeScript types (plus optional Zod schemas) from its schema. It is aimed at developers who prefer raw SQL over ORMs but still want type checking and IntelliSense for database access code.

## Use cases
- generate typescript types from postgres schema
- type-safe database access without an orm
- generate zod schemas from database tables
- keep typescript types in sync with database schema
- generate initializer and mutator types for tables
- code generation from a live postgres database

## When to choose
- you use raw SQL or a query builder and want static types for your Postgres schema
- you want generated Zod validation schemas matching your tables
- you dislike heavyweight ORMs but want IntelliSense for database rows

## When to avoid
- you want an ORM with a query builder and runtime query generation
- your database is not PostgreSQL
- you need runtime schema migrations rather than type generation

## Facets
- artifact type: cli-tool
- maturity: active
- function: type-system, database, developer-tools
- domain: databases, developer-tools, web-development, backend
- platform: cli, cross-platform
- tags: postgresql, typescript, schema-types, zod, codegen, no-orm, code-generation, nodejs

## Member repositories
- kristiandupont/kanel (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:51.774853+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:28:23.415259+00:00, confidence not recorded.
  - readme: https://github.com/kristiandupont/kanel (fetched 2026-08-28T04:03:51.774853+00:00, sha a4e37cbe9a3c)
  - homepage: https://kristiandupont.github.io/kanel/ (fetched 2026-08-29T12:33:44.926751+00:00, sha ca9cc0dd1106)
  - registry_npm: https://registry.npmjs.org/kanel (fetched 2026-08-29T12:33:44.937078+00:00, sha 1e3bc60247d8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
