Published: 2026-05-26
Introducing Kubb v5
The meta framework for code generation gets a major upgrade. v5 is a ground-up rewrite: a new layered architecture, a unified AST, and up to 5x faster generation.
Generation is 2 to 4x faster
The internal renderer no longer depends on React. @kubb/renderer-jsx ships a synchronous render path that skips the React runtime, with built-in components for both the TypeScript and Markdown parsers. Pair that with the streaming pipeline and medium specs generate faster. Large ones improve much more.
A spec-neutral AST at the core
A new AST package sits at the center of every plugin. It exposes a Babel-style walk, collect, and transform API. Every plugin in the suite now runs on top of it, so output stays consistent and custom plugins build on a stable foundation. The AST is spec-neutral, which is what lets the adapter concept reach toward AsyncAPI, GraphQL, and other formats later.
A proper adapter abstraction
The new adapter handles parsing, validation, and schema naming in one place, applied automatically when you call defineConfig. Collision-safe schema and enum naming is on by default, and duplicate enums and objects are deduplicated automatically, so generated types stay clean even on tangled specs.
Parsers as separate packages
Parsers are now distinct packages you can compose. @kubb/parser-ts handles TypeScript output, and a new @kubb/parser-md lets any plugin emit .md files alongside generated code, so documentation can come straight from your spec.
Barrel files as a post-enforced plugin
Barrel file generation now runs through @kubb/plugin-barrel, a plugin with enforce: 'post' that fires after every other plugin. It ships inside kubb and defineConfig adds it for you, so existing setups need no changes unless you want to swap it out.
The full plugin suite, rewritten
Every plugin, from TypeScript and Zod to MSW, TanStack Query for React and Vue, client, Cypress, and Redoc, now runs on the new architecture. Compatibility presets cover a gradual migration if you need one.
Built-in MCP server for AI assistants
Kubb ships an MCP server out of the box, with no separate package to install. Connect Claude, Cursor, or any MCP-compatible AI tool to your Kubb setup over HTTP transport.
Multiple content types, handled correctly
APIs rarely serve a single content type. A POST /upload endpoint might take multipart/form-data for files and application/json for metadata at once. v4 picked one and dropped the rest. v5 generates a client that handles every content type on an endpoint, so the output covers the full surface of your API.
To upgrade, follow the v5 migration guide. Compatibility presets let you move at your own pace.
If you hit anything unexpected, open an issue on GitHub.
Kubb is open source and community-driven. If v5 helps your team, consider sponsoring the project.