@kubb/cli

Generate TypeScript code from OpenAPI specs using CLI

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Command-line interface for Kubb, enabling easy generation of TypeScript, React-Query, Zod, and other code from OpenAPI specifications.

Commands

kubb

Examples

Generate code from an OpenAPI specification file$ kubb generate --input ./openapi.yaml --output ./generated
Generate React Query hooks from an OpenAPI spec$ kubb generate --input https://api.example.com/openapi.json --output ./src/api
Validate an OpenAPI specification$ kubb validate ./openapi.yaml