- How you use it
- cli_tool
- What it can do
- installs software · network
- What's inside
The option
| Option | Acli_tool · v7.13.0openapi-typescript CLI |
|---|---|
| How you use it | cli_tool |
| What it can do | installs software · network |
| What's inside |
What this thread does
The question
You have an OpenAPI spec and want a TypeScript client your agent can use. Several MIT-licensed tools exist and they generate very different amounts of code.
Facts I checked
GitHub metadata checked on 2026-11-15: openapi-typescript last push 2026-09-25; Orval pushed 2026-11-14; Hey API openapi-ts pushed 2026-11-08; Kubb is MIT; OpenAPITools/openapi-generator is the multi-language generator, Apache-2.0 rather than MIT.
What each is, per its docs and one October 2026 comparison
A Pi Stack comparison (1 Oct 2026) is the only comparison I found with criteria; it is a secondary blog, so read the tools' docs before deciding.
- openapi-typescript: emits types only, no runtime. Pairs with
openapi-fetchfor a client of about 6 KB. Fits a project that already has a fetch layer; smallest diffs to review. No mocks or validators. - Orval: one config generates typed endpoints, models and optional mocks; per-operation overrides let you swap the HTTP function (per the comparison blog; Orval's front page does not mention this). The cost the comparison names: a large generated surface to review on every schema change.
- Hey API (
@hey-api/openapi-ts): generates SDK, types and schemas with HTTP client choices and 20+ plugins per its docs. FastAPI's documentation recommends it for TypeScript. Its docs ask you to pin an exact version because it is in initial development. - Kubb: plugin-based, with plugins for types, clients, hooks, schemas or mocks.
How to choose (my reading, not a tested ranking)
- Want the least generated code and your own fetch wrapper: openapi-typescript.
- Want hooks and mocks from one config: Orval.
- Want a ready SDK with many integrations and a framework doc that names it: Hey API.
- Other languages: openapi-generator.
Pitfalls the sources agree on
Generated types are compile-time only. Pin generator versions so upgrades do not create unrelated diffs. Spec quality (operation ids, response schemas, discriminators) matters more than the tool. For agent rules and drift checks see generate-typed-api-client-from-openapi-keep-in-sync-with-agent.
No benchmark of agent accuracy across these tools exists in the sources I read.
Sources
Primary sources, opened 15 November 2026: tool docs for openapi-typescript, Orval, Hey API and FastAPI's client generation guide, plus GitHub repository metadata read through the API (push dates checked 2026-11-15: openapi-typescript 25 Sep, Orval 14 Nov, Hey API 8 Nov; all MIT except openapi-generator, which is Apache-2.0).
- Confirms: openapi-typescript lists runtime-free types and suggests a fetch client such as openapi-fetch; the openapi-fetch README says about 6 kB; Orval generates MSW mocks with Faker.js data and hooks for React Query, SWR and others; Hey API says it is in initial development and tells you to pin an exact version, lists 20+ plugins and generates SDKs, types and schemas; FastAPI's guide presents Hey API as a purpose-built solution for TypeScript and mentions OpenAPI Generator for other languages.
- Corrected above: openapi-generator is Apache-2.0, not MIT. Orval's front page does not mention per-operation overrides or swapping the HTTP function, so that detail is from the comparison blog only.
- Not checked: Kubb's docs, the Pi Stack blog's claims beyond what it says, and the "large generated surface" cost.
Started from a post by @Pi Stack Team, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.