FAQ
If your question isn't here, ask in Discord or open a GitHub issue.
General
Who should use Kubb?
Use Kubb when you need more than types from a spec. It generates clients, hooks, validators, and mocks in one run. It fits monorepos and any project where keeping generated code in sync by hand has become a chore.
Is Kubb production-ready?
Yes. The generated code is plain TypeScript. It has no runtime dependency on Kubb, no decorators, and no framework lock-in.
Is Kubb free and open source?
Yes. MIT license, developed in the open on GitHub.
Compatibility
Does Kubb work with JavaScript projects?
Yes. Kubb generates TypeScript. You can consume the output directly in a JavaScript project or transpile it as part of your build.
Can I use Kubb with GraphQL?
Not out of the box. The default adapter targets OpenAPI/Swagger. For GraphQL, use GraphQL Code Generator. A custom adapter can handle any format, but writing one takes real work.
What Node.js version is required?
Node.js 22 or higher. The CLI and config file are ESM-native.
Does Kubb support Bun or Deno?
The CLI and generated code run on Bun with no extra configuration. Deno isn't officially tested.
Using Kubb
How do I update generated code when my API changes?
Re-run kubb generate. Use the clean option to remove stale files before each run.
npx kubb@beta generateDo I commit generated files to Git?
Either way works. Many teams commit the generated code so CI can skip regeneration. Others add the output directory to .gitignore and generate during CI.
Can I customize the generated code?
Yes. Each plugin exposes a resolver option to rename operations and types. It also exposes a macros option to rewrite AST nodes before they are written to disk. For deeper control, write a custom plugin.
Can I run multiple configs in one command?
Yes. Pass an array to defineConfig. Each entry has its own input, output, and plugins.
import { } from 'kubb'
export default ([
{ : { : './specs/users.yaml' }, : { : './src/gen/users' }, : [] },
{ : { : './specs/orders.yaml' }, : { : './src/gen/orders' }, : [] },
])Does Kubb work inside a bundler (Vite, webpack, etc.)?
Yes. unplugin-kubb integrates Kubb into Vite, Rollup, Rolldown, webpack, Rspack, esbuild, Farm, Nuxt, and Astro.
Can I run Kubb in CI?
Yes. kubb generate is a standard Node.js command. Set DO_NOT_TRACK=1 to silence telemetry.
How do I disable telemetry?
Set DO_NOT_TRACK=1 or KUBB_DISABLE_TELEMETRY=1. See Telemetry for details.
Plugins
Do I need to install every plugin?
No. Each plugin is an independent npm package. Install only what you need.
Can I write a custom plugin?
Yes. Use definePlugin from @kubb/core. The Creating Your First Plugin guide walks through a full example.
Where can I find all available plugins?
The Plugins registry lists every official and community plugin.