About Kubb
The Meta Framework for Code Generation
Kubb is the meta framework for code generation.
Like Next.js on top of React, Kubb is a meta framework on top of code generation. Your OpenAPI specification is the source of truth; Kubb provides the pipeline, plugins, and extensibility you need.
Every output format is an independent plugin. The core is intentionally minimal. Plugins compose. You bring your spec, configure the outputs you need, and Kubb generates everything in one kubb generate run: TypeScript types, API clients, React Query hooks, Zod schemas, MSW handlers, and Faker mocks.
What does "Kubb" mean?
Kubb is named after the popular Swedish lawn game Kubb. The name reflects the project's philosophy: just as the game Kubb uses wooden blocks (kubbar), our Kubb uses modular plugins as building blocks.
Kubb (pronounced [kubː] in Swedish and Gutnish) is a lawn game where the objective is to knock over wooden blocks (kubbar) by throwing wooden batons (kastpinnar) at them. Kubb can be described as a combination of bowling and horseshoes.
The name is short, sounds like "cube" (fitting for a modular system), and happens to be Stijn's favorite summer game.
Project philosophy
Every feature in Kubb is implemented as a separate plugin. This is what makes Kubb a meta framework rather than a fixed code generator: there is no monolithic output, only composable pieces you assemble.
Current focus
Kubb currently specializes in generating TypeScript code from OpenAPI/Swagger specifications. To add support for a new specification format, you write a new adapter. The entire plugin ecosystem works unchanged on top of it.
Creator and maintainer
Kubb is created and maintained by Stijn Van Hulle.
Follow @stijnvanhulle on BlueSky for release announcements, new plugins, and development notes.
Community and contributions
Use GitHub Discussions for questions, Discord for real-time chat, and GitHub Issues for bugs and feature requests.
Kubb is MIT-licensed and open to contributions. Bug fixes, new plugins, and documentation improvements are all welcome. See the plugin guide to build your own.
Support the project
If Kubb saves you time, consider sponsoring on GitHub.