kubb
Kubb is a TypeScript code generation framework that automates creation of type-safe API clients, validators, and hooks from OpenAPI schemas. It uses a plugin-based architecture supporting multiple HTTP libraries (Axios, Fetch), state management solutions (TanStack Query, SWR, Vue Query), and validation frameworks (Zod, Faker, MSW).
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | kubb-labs/kubb |
| Owner | kubb-labs |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 1.8k |
| Forks | 146 |
| Open issues | 6 |
| Latest release | [email protected] (2026-07-07) |
| Last updated | 2026-07-08 |
| Source | https://github.com/kubb-labs/kubb |
What kubb is
Plugin-driven meta-framework for schema-to-code generation, ingesting OpenAPI 2.0/3.0/3.1 and outputting TypeScript types, HTTP clients with status-keyed results, validation schemas, and mock handlers. Supports JSX-based custom renderers, integrates with bundlers via unplugin, and exposes an MCP server for AI-driven generation.
Get the kubb source
Clone the repository and explore it locally.
git clone https://github.com/kubb-labs/kubb.gitcd kubb# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Beta release status (5.0.0-beta.87 as of 2026-07-08): production use should assess stability and breaking-change risk relative to your deployment schedule.
- Plugin selection and configuration required: evaluate which plugins (ts, axios, react-query, zod, etc.) align with your stack before initial setup.
- OpenAPI schema quality upstream: output fidelity depends on well-formed, consistent OpenAPI specs; malformed or incomplete schemas may require manual post-generation fixes.
- Custom adapter and renderer authoring possible via `kubb/kit`: advanced customization is feasible but adds maintenance burden if templates diverge from core plugin logic.
- Integration with bundlers (Vite, Nuxt, Astro, webpack) adds toolchain coupling; verify unplugin-kubb compatibility with your build setup.
When to avoid it — and what to weigh
- GraphQL-First Architecture — Kubb is OpenAPI-centric. GraphQL APIs require alternative code generation tools; no native GraphQL input adapter is listed.
- Non-TypeScript Ecosystems — Output is TypeScript-only. If your stack is Python, Go, Java, or polyglot non-TS backends, Kubb does not reduce friction for those targets.
- Minimal or No Customization Tolerance — The plugin system and JSX renderer introduce configuration overhead. Teams seeking zero-config, one-click generation may find setup and plugin selection burdensome.
- Legacy Non-OpenAPI Schemas — Kubb requires OpenAPI adapters. Proprietary, RAML, or API Blueprint schemas need custom adapters or manual conversion to OpenAPI.
License & commercial use
MIT License (permissive, OSI-compliant). Allows commercial use, modification, distribution, and private use with no warranty. Attribution appreciated but not legally required.
MIT permits commercial use without restriction or license cost. No proprietary or commercial-use clauses present. However, Kubb itself is community-funded via sponsorships and GitHub/Open Collective support; commercial deployments should consider sponsoring the maintainer(s) for long-term sustainability.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Strong |
| Assessment confidence | High |
Generated code is TypeScript and inherits security from chosen HTTP libraries (Axios, Fetch) and validation frameworks (Zod). OpenAPI schema injection vectors should be reviewed if schemas come from untrusted sources. Auth, file upload, and SSE support noted but implementation security depends on plugin-specific details and user code. No security audit or vulnerability disclosure policy mentioned in provided data.
Alternatives to consider
OpenAPI Generator (openapi-generator-cli)
Mature, language-agnostic, extensive template library; lacks built-in plugin system and TypeScript-first focus. Steeper learning curve for customization.
Swagger Codegen
Official Swagger/OpenAPI tool with broad language support; less opinionated about TypeScript ecosystem integrations (React Query, TanStack, Zod). Slower iteration on modern JS/TS conventions.
tRPC Code Generation (e.g., tRPC-OpenAPI or similar)
If your backend is tRPC-native, in-language code generation avoids OpenAPI translation overhead. Not suitable for external API integration or polyglot teams.
Build on kubb with DEV.co software developers
Kubb streamlines TypeScript client generation from OpenAPI schemas. Our team can assess your schema maturity, select plugins, and integrate generation into your CI/CD pipeline.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
kubb FAQ
Can Kubb generate code for GraphQL APIs?
Is the generated code tree-shakeable and production-ready?
Can I customize generated code templates?
Do I need to version-control generated files?
Work with a software development agency
DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If kubb is part of your mcp servers roadmap, our team can implement, customize, migrate, and maintain it.
Ready to Automate Your API Integration?
Kubb streamlines TypeScript client generation from OpenAPI schemas. Our team can assess your schema maturity, select plugins, and integrate generation into your CI/CD pipeline.