Profile
Back to NewsBack
GitHub Trending 4 min
Reader Mode
kubb-labs/kubb: ๐Ÿงก The meta framework for code generation. Automate OpenAPI to type-safe TypeScript, Zod, and TanStack Query with a modular, plugin-based engine.

kubb-labs/kubb: ๐Ÿงก The meta framework for code generation. Automate OpenAPI to type-safe TypeScript, Zod, and TanStack Query with a modular, plugin-based engine.

11 hours ago

Kubb banner

[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Stars][stars-src]][stars-href] [![License][license-src]][license-href] [![Coverage][coverage-src]][coverage-href] [![Node][node-src]][node-href] [![OC Backers][oc-backers-src]][oc-backers-href]

Documentation ยท Report Bug ยท Request Feature


Kubb

The meta framework for code generation

Point Kubb at a schema and it generates types, clients, hooks, validators, mocks, and more.

Installation

bun add kubb

or

pnpm add kubb

or

npm install kubb

Quick start

Run the setup wizard to create a kubb.config.ts:

npx kubb init

The wizard creates a package.json if needed, guides you through plugin selection, installs packages, and writes kubb.config.ts. Then generate your code:

npx kubb generate

See the documentation for detailed usage and advanced features.

Features

  • Generate TypeScript types, type-safe clients, TanStack Query and SWR hooks, Zod validators, Faker mocks, and MSW handlers from one schema.
  • Generate a typed axios or Fetch client with status-keyed results, auth, validation, file uploads, server-sent events, interceptors, and a swappable transport.
  • Read OpenAPI 2.0, 3.0, and 3.1 through adapters like @kubb/adapter-oas, with output for Node.js and Bun.
  • Enable only the plugins you need: plugin-ts, plugin-axios, plugin-fetch, plugin-react-query, plugin-vue-query, plugin-swr, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-redoc, plugin-mcp.
  • Shape the output by grouping files by tag, including or excluding operations, and writing to disk, memory, or a custom storage backend.
  • Build your own plugins, generators, adapters, and renderers with the kubb/kit authoring toolkit, plus a JSX renderer for component-based output.
  • Run generation in your bundler with unplugin-kubb for Vite, Nuxt, Astro, webpack, and more.
  • Drive generation from AI tools over the built-in MCP server (Claude, Cursor) or inside Claude Code.

Supporting Kubb

Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:

stijnvanhulle sponsors

Contributing

We welcome contributions that help improve Kubb. A few ways to get involved:

See CONTRIBUTING.md for the project structure, local setup, and commands.

Contributors [![Contributors][contributors-src]][contributors-href]

Stijn Van Hulle
Stijn Van Hulle

๐Ÿ’ป
Alfred
Alfred

๐Ÿ’ป
Kirill Agalakov
Kirill Agalakov

๐Ÿ’ป
Nick Williams
Nick Williams

๐Ÿ“–
helt
helt

๐Ÿ’ป
Vasily Mikhaylovsky
Vasily Mikhaylovsky

๐Ÿ’ป
Chaim Lev-Ari
Chaim Lev-Ari

๐Ÿ’ป
Pavel Belousov
Pavel Belousov

๐Ÿ’ป
Dmitry Belov
Dmitry Belov

๐Ÿ’ป
Alex Burgel
Alex Burgel

๐Ÿ’ป
Daniel Garcia
Daniel Garcia

๐Ÿ’ป
wuyuanyi135
wuyuanyi135

๐Ÿ’ป
Chris Thompson
Chris Thompson

๐Ÿ’ป
Caleb Hoyoul Kang
Caleb Hoyoul Kang

๐Ÿ’ป
Gregory Zhukovsky
Gregory Zhukovsky

๐Ÿ’ป
Christoffer Nรธrbjerg
Christoffer Nรธrbjerg

๐Ÿ’ป
CHE1RON
CHE1RON

๐Ÿ’ป
ekaradon
ekaradon

๐Ÿ’ป
Thijmen Stavenuiter
Thijmen Stavenuiter

๐Ÿ’ป
Bohdan Husak
Bohdan Husak

๐Ÿ“–
ร‰ric Le Maรฎtre
ร‰ric Le Maรฎtre

๐Ÿ’ป
Rubens Pereira do Nascimento
Rubens Pereira do Nascimento

๐Ÿ’ป
Matt Sutkowski
Matt Sutkowski

๐Ÿ’ป
Vรญtor Camacho
Vรญtor Camacho

๐Ÿ’ป
Vรกclav Prochรกzka
Vรกclav Prochรกzka

๐Ÿ’ป
Luiz Bett
Luiz Bett

๐Ÿ’ป
Sebastian Andersen
Sebastian Andersen

๐Ÿ’ป
Akino
Akino

๐Ÿ’ป
Ricardo Machado
Ricardo Machado

๐Ÿ’ป
Simon El Nahas
Simon El Nahas

๐Ÿ“–
maartenvansambeek
maartenvansambeek

๐Ÿ’ป
Stefan du Fresne
Stefan du Fresne

๐Ÿ’ป
Hugo Felippe de Souza Cruz
Hugo Felippe de Souza Cruz

๐Ÿ’ป
Sรฉbastien Vanvelthem
Sรฉbastien Vanvelthem

๐Ÿ’ป
Vitaly Gashkov
Vitaly Gashkov

๐Ÿ“–
Duco Drupsteen
Duco Drupsteen

๐Ÿ’ป
th3l0g4n
th3l0g4n

๐Ÿ’ป
rxliuli
rxliuli

๐Ÿ’ป
humarkx
humarkx

๐Ÿ’ป
Jakub Cerovsky
Jakub Cerovsky

๐Ÿ’ป
Pachara Chantawong
Pachara Chantawong

๐Ÿ’ป
Volodymyr Kushnir
Volodymyr Kushnir

๐Ÿ’ป
GKNewsrooms
GKNewsrooms

๐Ÿ’ป
Kamil Stepczuk
Kamil Stepczuk

๐Ÿ’ป
Joรฃo Brilhante
Joรฃo Brilhante

๐Ÿ’ป
Kamil Sieradzki
Kamil Sieradzki

๐Ÿ’ป
Eric Pierlot
Eric Pierlot

๐Ÿ’ป
Alexander Sjรถcrona Tholin
Alexander Sjรถcrona Tholin

๐Ÿ’ป
Stephen Zhou
Stephen Zhou

๐Ÿ’ป
Ilia Choly
Ilia Choly

๐Ÿ’ป
Alex Skoropad
Alex Skoropad

๐Ÿ’ป
Jay Patel
Jay Patel

๐Ÿ’ป
Hamza Mihai Daniel
Hamza Mihai Daniel

๐Ÿ’ป
DesselBane
DesselBane

๐Ÿ’ป

License

This repository is licensed under the MIT License, Copyright ยฉ 2025 Stijn Van Hulle.

See LICENSE for details.

Star history

Star history chart

[npm-version-src]: https://shieldcn.dev/npm/v/@kubb/core.svg?variant=secondary&size=xs&theme=zinc&mode=dark [npm-version-href]: https://npmx.dev/package/@kubb/core [npm-downloads-src]: https://shieldcn.dev/npm/dm/@kubb/core.svg?variant=secondary&size=xs&theme=zinc&mode=dark [npm-downloads-href]: https://npmx.dev/package/@kubb/core [stars-src]: https://shieldcn.dev/github/stars/kubb-labs/kubb.svg?variant=secondary&size=xs&theme=zinc&mode=dark [stars-href]: https://github.com/kubb-labs/kubb [license-src]: https://shieldcn.dev/npm/license/kubb.svg?variant=secondary&size=xs&theme=zinc [license-href]: https://github.com/kubb-labs/kubb/blob/main/LICENSE [node-src]: https://shieldcn.dev/npm/node/kubb.svg?variant=secondary&size=xs&theme=zinc&mode=dark [node-href]: https://npmx.dev/package/@kubb/core [contributors-src]: https://shieldcn.dev/github/contributors/kubb-labs/kubb.svg?variant=secondary&size=xs&theme=zinc&mode=dark [contributors-href]: #contributors- [coverage-src]: https://shieldcn.dev/codecov/github/kubb-labs/kubb.svg?variant=secondary&size=xs&theme=zinc&mode=dark [coverage-href]: https://app.codecov.io/gh/kubb-labs/kubb [oc-backers-src]: https://shieldcn.dev/opencollective/backers/kubb.svg?variant=secondary&size=xs&theme=zinc&mode=dark [oc-backers-href]: https://opencollective.com/kubb

Chat with me