# gcanti/io-ts

Runtime type system for IO decoding/encoding

Repository: https://github.com/gcanti/io-ts
Canonical: https://ross.abutalabs.com/products/io-ts
Homepage: https://gcanti.github.io/io-ts/
Language: TypeScript
License: MIT
License Family: permissive
Topics: typescript, validation, inference, types, runtime
Last push: 2024-12-10T11:53:31+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3504, "days_push": 631, "days_rel": 631, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6808, forks 318 (observed 2026-08-28T04:09:48.742969+00:00)

## What it is
io-ts is a TypeScript library providing a runtime type system for decoding and encoding data at IO boundaries. Codecs combine static types with runtime validation, type guards, and encoding via fp-ts's Either type.

## Use cases
- validate untrusted JSON against a TypeScript type at runtime
- decode API responses into typed values
- encode domain objects before sending them over the wire
- create custom type guards for unknown inputs
- define runtime-checked schemas shared between frontend and backend

## When to choose
- you want static TypeScript types and runtime validation from a single definition
- your codebase already uses fp-ts and functional programming patterns
- you need precise, composable decoders with detailed error contexts

## When to avoid
- you want a simple schema validator without functional programming concepts like Either and monads
- you prefer Zod-style ergonomic APIs with less boilerplate
- your project is plain JavaScript without TypeScript

## Facets
- artifact type: library
- maturity: stable
- function: serialization, type-system, form-handling
- domain: developer-tools, web-development, apis
- platform: cross-platform
- tags: runtime-type-system, codec, decoder, encoder, fp-ts, type-guards, nodejs, typescript

## Member repositories
- gcanti/io-ts (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.742969+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-29T17:42:04.105967+00:00, confidence not recorded.
  - readme: https://github.com/gcanti/io-ts (fetched 2026-08-28T04:09:48.742969+00:00, sha 5ac3935379b2)
  - homepage: https://gcanti.github.io/io-ts/ (fetched 2026-08-29T08:38:24.173405+00:00, sha 5d1c00122a2a)
  - registry_npm: https://registry.npmjs.org/io-ts (fetched 2026-08-29T08:38:24.182665+00:00, sha 3f36aa02e0f1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
