Skip to content

← Blog

Published: 2026-05-26

Release of Kubb 5.0

Introducing Kubb v5

The meta framework for code generation just got a major upgrade. A ground-up rewrite with a new layered architecture, unified AST, and up to 5x faster generation.

Generation is 2–4x faster

The internal renderer no longer depends on React. @kubb/renderer-jsx ships a synchronous render path that skips the React runtime entirely, with built-in components for both the TypeScript and Markdown parsers. Combined with the streaming pipeline, generation is noticeably faster on medium specs and significantly faster on large ones.

A spec-neutral AST at the core

A new AST package sits at the center of every plugin. It provides a Babel-style walk, collect, and transform API. Every plugin in the suite has been rewritten on top of it, giving you consistent output and a stable foundation for custom plugins. Because the AST is spec-neutral, the adapter concept opens the door to supporting AsyncAPI, GraphQL, and more in the future.

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 on complex 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 you can generate documentation directly 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 all other plugins. It ships inside kubb and is added automatically by defineConfig, so existing setups need no changes unless you want to swap it out.

The full plugin suite, rewritten

Every plugin — TypeScript, Zod, MSW, TanStack Query (React and Vue), client, Cypress, Redoc — has been rewritten on the new architecture. Legacy compatibility presets are available if you need to migrate gradually.

Built-in MCP server for AI assistants

Kubb now includes an MCP server out of the box. No separate package to install. Connect Claude, Cursor, or any MCP-compatible AI tool directly to your Kubb setup via HTTP transport.

Multiple content types, handled correctly

APIs rarely serve a single content type. A POST /upload endpoint might accept multipart/form-data for files and application/json for metadata at the same time. In v4, Kubb picked one and discarded the rest. In v5, the generated client handles all content types on an endpoint, so the generated code covers the full surface of your API.


To upgrade, follow the v5 migration guide. Compatibility presets let you migrate 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.

👋🏽 Stijn Van Hulle