Skip to content
Integrations

Integrate Kubb with Studio, CI, and build tools

Connect Kubb to Studio, publish snapshots from CI, or run generation during a Vite, webpack, Rollup, Rolldown, Rspack, esbuild, Farm, Nuxt, or Astro build.

Run Kubb from Studio, from CI, or during your build. Each integration uses your shared kubb.config.ts.

Studio

Kubb Studio

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

CI

CI snapshots

Publish installable Studio snapshots from any CI provider.

GitHub Actions

Publish snapshots from GitHub Actions and review generated-file changes.

GitLab CI

Publish snapshots from GitLab CI and review generated-file changes.

Build tools

Kubb runs generation during your build through unplugin-kubb, included with kubb. Each integration takes your kubb.config.ts as a single config object and generates when the tool builds. Without config, it loads kubb.config.ts like the CLI does.

Vite

Import from kubb/vite.

webpack

Import from kubb/webpack.

Rollup

Import from kubb/rollup.

Rolldown

Import from kubb/rolldown.

Rspack

Import from kubb/rspack.

esbuild

Import from kubb/esbuild.

Farm

Import from kubb/farm.

Nuxt

Import from kubb/nuxt.

Astro

Import from kubb/astro.

Vite, Nuxt, and Astro generate during builds only. Run kubb generate before starting their development servers.

Bundler integrations apply fewer defaults than the CLI: no Markdown parser, no reporters, and no output.postGenerate commands. See Defaults.

Import a spec

Import a *.openapi.yaml or *.openapi.yml file to get the output of every plugin in your config as one module, without generated files. A config without input only serves these imports.

import { type Pet, petStatusEnum } from './petStore.openapi.yaml'

Code a plugin writes to a separate file, such as a bundled client runtime, is not included. For types in tsc and your editor, add openapi-import.

TypeScript

openapi-import

Import a *.openapi.yaml spec in TypeScript and type-check the output of your plugins.