Skip to content
Integrations

Integrate Kubb with Studio, CI, and build tools

See where Kubb runs besides the CLI, from Kubb Studio and CI snapshots to build tool plugins, openapi-import, and AI assistants, all from one kubb.config.ts.

Every integration runs the same kubb.config.ts. You pick where Kubb runs.

kubb.config.tsAI assistantskubb generatekubb mcpkubb studioCI snapshotBuild toolsopenapi-importKubb Studio

Pick an integration

Kubb Studio

Connect a local project and review generated files in the browser.

CI snapshots

Publish an installable package per pull request from GitHub Actions, GitLab CI, or any CI.

openapi-import

Import a *.openapi.yaml spec in TypeScript and type-check the plugin output, without generated files.

AI assistants

Run Kubb from Claude Code, Cursor, or another assistant through the CLI or the MCP server.

Build tools

unplugin-kubb runs your kubb.config.ts when a build starts. It ships with kubb, and you import it from kubb/<tool>.

build startsload kubb.config.tsgeneratefiles writtenbuild continuesBuild toolunplugin-kubbKubbBuild toolunplugin-kubbKubb
Vite, Nuxt, and Astro generate during builds only, not in their dev servers. Run kubb generate before you start a dev server.

Each tool page passes your kubb.config.ts as config. Without config, the plugin finds kubb.config.ts like the CLI does and builds every config in it that has an input.

ToolImportConfig file
Vitekubb/vitevite.config.ts
webpackkubb/webpackwebpack.config.ts
Rspackkubb/rspackrspack.config.ts
Rollupkubb/rolluprollup.config.ts
Rolldownkubb/rolldownrolldown.config.ts
esbuildkubb/esbuildbuild.ts
Farmkubb/farmfarm.config.ts
Nuxtkubb/nuxtnuxt.config.ts
Astrokubb/astroastro.config.mjs

How the build runs Kubb

  • The plugin applies the same defaults as defineConfig and runs output.format, output.lint, and output.postGenerate.
  • It prints the run summary, not the json, file, or html reports. Use kubb generate for those.
  • Watch rebuilds reuse the first output. Restart the build after you change the spec or kubb.config.ts.

Import a spec as a module

Import a *.openapi.yaml or *.openapi.yml file to get the output of every plugin in your config as one module. Kubb writes no files for it, and it works in the Vite dev server too.

src/pets.ts
import { type Pet, petStatusEnum } from './petStore.openapi.yaml'
  • The import uses the config whose input is that spec, or else the first config without an input. A config without input only serves imports.
  • Code a plugin writes to a separate file, such as a bundled client runtime, is not part of the module.

For types in tsc and your editor, add openapi-import.