openapi-ts

OpenAPI-to-TypeScript code generator producing production-grade SDKs, Zod schemas, and TanStack Query hooks.

Tool
npm
v0.99.0
5,275stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
87/100Excellent
Development Activity96
Maintenance100
Community64
Maturity48
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture82
Code Quality84
Innovation78
Learning Curve68

openapi-ts (@hey-api/openapi-ts) is the flagship code generator of the Hey API ecosystem, turning any OpenAPI specification into typed, production-ready TypeScript: fully-typed request/response models, SDK client functions, Zod validation schemas, and framework hooks such as TanStack Query — via a plugin architecture with 20+ official plugins covering HTTP clients (Fetch, Axios, Angular, Next.js, Nuxt), validation libraries (Zod, Valibot, ArkType), and mock/faker data generation.

It runs as a CLI or programmatic Node.js API driven by an openapi-ts.config.ts file, and is used in production by companies including Vercel, PayPal, AWS, and Autodesk according to the project’s README, with millions of weekly npm downloads.

What You Get

  • A CLI and programmatic Node.js API for generating TypeScript code from any OpenAPI specification
  • 20+ official plugins covering HTTP clients (Fetch, Axios, Angular, Next.js, Nuxt), validators (Zod, Valibot, ArkType), and TanStack Query hooks
  • Fully typed request/response models and SDK client functions generated directly from the spec
  • A config-file-driven (openapi-ts.config.ts) workflow that supports custom plugin composition
  • Optional sync integration with the Hey API Registry for centralized spec management

Common Use Cases

  • Generating a fully typed TypeScript SDK for a backend API directly from its OpenAPI/Swagger spec
  • Producing Zod validation schemas alongside generated types to validate API responses at runtime
  • Wiring generated SDK calls into TanStack Query hooks for React/Vue/Angular data-fetching layers
  • Keeping frontend and backend types in sync automatically as part of a CI pipeline that regenerates code on spec changes

Under The Hood

Architecture - openapi-ts is one package within the larger hey-api/hey-api Turborepo/pnpm monorepo; internally, src/generate.ts and src/generate/ drive the generation pipeline, src/plugins/ implements the 20+ pluggable output targets (SDK clients, Zod schemas, TanStack Query hooks, etc.), src/ts-compiler/src/ts-dsl provide a TypeScript AST-building layer used to emit generated code, and src/config parses and validates the openapi-ts.config.ts file that drives a run. src/contracts and src/symbols manage the intermediate representation shared across plugins as they consume the parsed OpenAPI spec. Tech Stack - TypeScript throughout, targeting Node.js 22+; the monorepo uses pnpm workspaces, Turborepo for build orchestration, and Vitest for testing, with a companion @hey-api/codegen-core package supplying shared AST/codegen primitives used across both the TypeScript and Python generators in the same monorepo. Code Quality - Extensive __tests__ directories at both the monorepo root and within packages/openapi-ts, GitHub Actions CI (badge referenced in the README), Renovate-managed dependency updates, and a CLAUDE.md contributor guide tailored for AI coding agents all point to a professionally maintained, actively developed codebase. API Design - The plugin architecture is the key design choice: rather than hard-coding output formats, openapi-ts exposes a plugin contract that both official and third-party plugins implement, so adding a new client library or validator target doesn’t require forking the core generator — this is reflected in the config file simply listing which plugins to run.

Used by 13 apps in this directory

TypeScript
51%
MIT

Anarlog

Note Taking · AI Assistants · Productivity

9,087

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
69
Dependency
Built with
TypeScript51%
Rust38%
Updated today
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
TypeScript
97%
Other

Kibana

Analytics · Monitoring

21,251

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
68
Dependency
Built with
TypeScript97%
Updated today
Clojure
54%
Other

Metabase

Analytics

48,828

The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.

View details
95
Repo Health
84
Technical
65
Dependency
Built with
Clojure54%
TypeScript40%
Updated today
TypeScript
76%
MIT

OpenCode

AI Code Assistants

198,979

A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.

View details
89
Repo Health
76
Technical
68
Dependency
Built with
TypeScript76%
MDX21%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

29,711

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
84
Repo Health
75
Technical
65
Dependency
Built with
Python74%
Rust14%
Updated today
TypeScript
51%
ZLIB

Portainer

Devops

38,269

A lightweight, open-source web UI that puts Docker, Kubernetes, and Podman management within reach of any team—no CLI expertise required.

View details
93
Repo Health
79
Technical
67
Dependency
Built with
TypeScript51%
Go38%
Updated yesterday
TypeScript
96%
Other

Refly

No Code Platforms · AI Development · Automation

7,490

Build deterministic, versioned agent skills from natural language—run them anywhere from Claude Code to Slack.

View details
66
Repo Health
76
Technical
64
Dependency
Built with
TypeScript96%
Updated 3 weeks ago
TypeScript
98%
Apache 2.0

Tianji

Analytics · Monitoring

3,080

Replace Google Analytics, UptimeKuma, and Prometheus with one self-hosted platform that tracks websites, monitors uptime, and reports server health.

View details
84
Repo Health
76
Technical
66
Dependency
Built with
TypeScript98%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search