# fabien0102/ts-to-zod

Generate zod schemas from typescript types/interfaces

Repository: https://github.com/fabien0102/ts-to-zod
Canonical: https://ross.abutalabs.com/products/ts-to-zod
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-06-29T13:33:16+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 90, release rhythm 56, longevity 100
- inputs: {"age_days": 1983, "days_push": 65, "days_rel": 292, "gap_med": 9.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1635, forks 96 (observed 2026-08-28T04:05:14.587734+00:00)

## What it is
ts-to-zod is a CLI tool that generates Zod validation schemas from TypeScript types and interfaces. It verifies that generated schemas are type-compatible with the originals and supports JSDoc tags for extra validators.

## Use cases
- generate zod schemas from typescript types
- validate api responses at runtime with schemas derived from types
- convert typescript interfaces to zod
- keep zod schemas in sync with typescript types
- add runtime validation to a typescript codebase
- generate schemas for untrusted api data

## When to choose
- you already use TypeScript types and want matching Zod schemas without writing them by hand
- you want guaranteed type compatibility between your types and generated schemas
- you want a simple CLI that fits into a build script or CI pipeline

## When to avoid
- you don't use TypeScript or Zod
- you need schemas for OpenAPI/JSON Schema rather than Zod
- you need a library API for in-process generation rather than a CLI

## Facets
- artifact type: cli-tool
- maturity: active
- function: form-handling, type-system, cli, developer-tools
- domain: developer-tools, apis, backend
- platform: cli, cross-platform
- tags: zod, schema-generation, runtime-validation, typescript-to-zod, code-generator, code-generation, typescript, nodejs

## Member repositories
- fabien0102/ts-to-zod (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:14.587734+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-30T03:47:00.440654+00:00, confidence not recorded.
  - readme: https://github.com/fabien0102/ts-to-zod (fetched 2026-08-28T04:05:14.587734+00:00, sha 11915f44bb2b)
  - registry_npm: https://registry.npmjs.org/ts-to-zod (fetched 2026-08-29T11:20:14.012513+00:00, sha 67ce745bdde2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
