# Kubb > Stop writing glue code. Define your API once and Kubb generates types, clients, hooks, validators and mocks. ## Table of Contents ### Reference - [Options](/plugins/plugin-axios/reference/options.md): Configuration options for @kubb/plugin-axios. ### Guide - [Authenticate your API client](/plugins/plugin-axios/guide/authentication.md): Add authentication to the client Kubb generates. Resolve bearer, basic, and apiKey credentials from your OpenAPI security schemes with one auth callback. - [Set your own baseURL](/plugins/plugin-axios/guide/base-url.md): Set up base URLs for API clients generated by Kubb. Environment-specific configuration and dynamic base URLs. - [Call operations](/plugins/plugin-axios/guide/calling-operations.md): Call the functions Kubb generates from your OpenAPI spec. Pass typed path, query, header, cookie, and body parameters, then read the status, data, and native response off one result. - [Error handling](/plugins/plugin-axios/guide/error-handling.md): Handle failures from the client Kubb generates. Catch a ResponseError, switch to a returned error result with throwOnError, and tell a network failure apart from a 4xx or 5xx response. - [Interceptors](/plugins/plugin-axios/guide/interceptors.md): Run code on every call the Kubb client makes. Add or rewrite headers before the send, observe or transform the response, react to errors, and register, replace, or remove handlers at runtime. - [Serialization and parsing](/plugins/plugin-axios/guide/serialization.md): Control how Kubb encodes path, query, header, and cookie parameters, serializes request bodies per content type, and decodes and validates responses in the generated Fetch and Axios client. - [Use a custom transport](/plugins/plugin-axios/guide/transport.md): Replace the transport the generated client sends through. Wrap fetch with retries or pass a pre-configured axios instance, while Kubb keeps owning URLs, serialization, and auth. ### Recipes - [Class-based SDK](/plugins/plugin-axios/recipes/class-based-sdk.md): Generate a class-based SDK from your OpenAPI spec with @kubb/plugin-axios, one class per tag or a single flat class. - [Validate requests and responses](/plugins/plugin-axios/recipes/validate-requests-and-responses.md): Validate request and response bodies at runtime with Zod schemas using @kubb/plugin-axios and @kubb/plugin-zod. - [Build a URL without sending](/plugins/plugin-axios/recipes/build-a-url-without-sending.md): Build an operation's final URL without sending a request using the client @kubb/plugin-axios bundles. - [Point at an env-driven host](/plugins/plugin-axios/recipes/point-at-an-env-driven-host.md): Read the API host from an environment variable at runtime by setting baseURL with @kubb/plugin-axios. ### Reference - [Options](/plugins/plugin-barrel/reference/options.md): Configuration options for @kubb/plugin-barrel. Sets the re-export style for the index.ts barrel files Kubb generates. ### Recipes - [Named re-exports for tree-shaking](/plugins/plugin-barrel/recipes/named-re-exports-for-tree-shaking.md): Set the barrel type to named so each barrel re-exports symbols by name, keeping imports explicit and bundlers able to tree-shake. - [One wildcard barrel](/plugins/plugin-barrel/recipes/one-wildcard-barrel.md): Set the barrel type to all so each barrel uses export star, a smaller barrel that re-exports everything. - [A barrel in every folder](/plugins/plugin-barrel/recipes/a-barrel-in-every-folder.md): Set nested to true on a plugin's output.barrel so it writes an index.ts in every subdirectory, letting callers import from any depth. - [Turn barrels on](/plugins/plugin-barrel/recipes/turn-barrels-on.md): output.barrel defaults to false. Set it on defineConfig to enable a root barrel and the default every plugin without its own output.barrel inherits. ### Reference - [Options](/plugins/plugin-cypress/reference/options.md): Configuration options for @kubb/plugin-cypress. ### Recipes - [Typed request helpers against staging](/plugins/plugin-cypress/recipes/typed-request-helpers-against-staging.md): Point the generated Cypress request helpers at a non-production host with the baseURL option. ### Reference - [Options](/plugins/plugin-faker/reference/options.md): Configuration options for @kubb/plugin-faker. ### Recipes - [Localized mock data](/plugins/plugin-faker/recipes/localized-mock-data.md): Generate region-specific mock values from @kubb/plugin-faker by setting the locale option. - [Format date fields with Day.js](/plugins/plugin-faker/recipes/format-date-fields-with-dayjs.md): Format generated date and time fields with Day.js by setting the dateParser option in @kubb/plugin-faker. - [Deterministic data with a seed](/plugins/plugin-faker/recipes/deterministic-data-with-a-seed.md): Produce the same mock values on every run by setting the seed option in @kubb/plugin-faker. ### Reference - [Options](/plugins/plugin-fetch/reference/options.md): Configuration options for @kubb/plugin-fetch. ### Guide - [Authenticate your API client](/plugins/plugin-fetch/guide/authentication.md): Add authentication to the client Kubb generates. Resolve bearer, basic, and apiKey credentials from your OpenAPI security schemes with one auth callback. - [Set your own baseURL](/plugins/plugin-fetch/guide/base-url.md): Set up base URLs for API clients generated by Kubb. Environment-specific configuration and dynamic base URLs. - [Call operations](/plugins/plugin-fetch/guide/calling-operations.md): Call the functions Kubb generates from your OpenAPI spec. Pass typed path, query, header, cookie, and body parameters, then read the status, data, and native response off one result. - [Error handling](/plugins/plugin-fetch/guide/error-handling.md): Handle failures from the client Kubb generates. Catch a ResponseError, switch to a returned error result with throwOnError, and tell a network failure apart from a 4xx or 5xx response. - [Interceptors](/plugins/plugin-fetch/guide/interceptors.md): Run code on every call the Kubb client makes. Add or rewrite headers before the send, observe or transform the response, react to errors, and register, replace, or remove handlers at runtime. - [Serialization and parsing](/plugins/plugin-fetch/guide/serialization.md): Control how Kubb encodes path, query, header, and cookie parameters, serializes request bodies per content type, and decodes and validates responses in the generated Fetch and Axios client. - [Server-sent events](/plugins/plugin-fetch/guide/server-sent-events.md): Consume a text/event-stream operation from the client Kubb generates. Iterate typed Server-Sent Events with for-await, read the native response, and stop the stream with an AbortSignal. - [Use a custom transport](/plugins/plugin-fetch/guide/transport.md): Replace the transport the generated client sends through. Wrap fetch with retries or pass a pre-configured axios instance, while Kubb keeps owning URLs, serialization, and auth. ### Recipes - [Class-based SDK](/plugins/plugin-fetch/recipes/class-based-sdk.md): Generate a class-based SDK from your OpenAPI spec with @kubb/plugin-fetch, one class per tag or a single flat class. - [Validate requests and responses](/plugins/plugin-fetch/recipes/validate-requests-and-responses.md): Validate request and response bodies at runtime with Zod schemas using @kubb/plugin-fetch and @kubb/plugin-zod. - [Build a URL without sending](/plugins/plugin-fetch/recipes/build-a-url-without-sending.md): Build an operation's final URL without sending a request using the client @kubb/plugin-fetch bundles. - [Point at an env-driven host](/plugins/plugin-fetch/recipes/point-at-an-env-driven-host.md): Read the API host from an environment variable at runtime by setting baseURL with @kubb/plugin-fetch. - [Stream server-sent events](/plugins/plugin-fetch/recipes/stream-server-sent-events.md): Consume a text/event-stream operation from the client @kubb/plugin-fetch generates, reading typed events with for-await. ### Reference - [Options](/plugins/plugin-mcp/reference/options.md): Configuration options for @kubb/plugin-mcp. ### Recipes - [A working MCP server from a spec](/plugins/plugin-mcp/recipes/a-working-mcp-server-from-a-spec.md): Register the TypeScript, Zod, and one client plugin alongside pluginMcp to generate a working MCP server from an OpenAPI spec. - [Choose the client when two are registered](/plugins/plugin-mcp/recipes/choose-the-client-when-two-are-registered.md): Set the client option so the MCP handlers know which HTTP client to call when both the Axios and Fetch plugins are registered. ### Reference - [Options](/plugins/plugin-msw/reference/options.md): Configuration options for @kubb/plugin-msw. ### Recipes - [Handlers you fill from tests](/plugins/plugin-msw/recipes/handlers-you-fill-from-tests.md): Generate MSW handlers that return an empty typed payload you supply from each test by keeping the parser option on its default. - [Auto-generated mock data](/plugins/plugin-msw/recipes/auto-generated-mock-data.md): Fill MSW handlers with generated Faker data by setting the parser option to faker alongside @kubb/plugin-faker. - [Register handlers with a server](/plugins/plugin-msw/recipes/register-handlers-with-a-server.md): Emit a handlers.ts collection with @kubb/plugin-msw and drop it into an MSW server or worker. ### Reference - [Options](/plugins/plugin-react-query/reference/options.md): Configuration options for @kubb/plugin-react-query. ### Guide - [Call operations](/plugins/plugin-react-query/guide/calling-operations.md): Use the TanStack Query hooks Kubb generates from your OpenAPI spec. Pass typed path, query, and header parameters and read data and error state off the hook. ### Recipes - [Infinite scroll query](/plugins/plugin-react-query/recipes/infinite-scroll-query.md): Generate useInfiniteQuery hooks for cursor-based pagination with @kubb/plugin-react-query. - [Custom query keys](/plugins/plugin-react-query/recipes/custom-query-keys.md): Control the queryKey array a useQuery hook uses for caching and invalidation with @kubb/plugin-react-query. - [Wrap every hook with shared options](/plugins/plugin-react-query/recipes/wrap-hooks-with-shared-options.md): Route every generated hook through your own options function with @kubb/plugin-react-query's customOptions. - [Suspense hooks](/plugins/plugin-react-query/recipes/suspense-hooks.md): Generate useSuspenseQuery hooks alongside the regular query hooks with @kubb/plugin-react-query. ### Reference - [Options](/plugins/plugin-redoc/reference/options.md): Configuration options for @kubb/plugin-redoc. ### Recipes - [Standalone API docs page](/plugins/plugin-redoc/recipes/standalone-api-docs-page.md): Generate a single HTML file with the spec embedded inline that you can drop on any static host with no build step. ### Reference - [Options](/plugins/plugin-swr/reference/options.md): Configuration options for @kubb/plugin-swr. ### Guide - [Call operations](/plugins/plugin-swr/guide/calling-operations.md): Use the SWR hooks Kubb generates from your OpenAPI spec. Queries fetch with typed parameters, and mutations pass their input through trigger. ### Recipes - [Skip a request until ready](/plugins/plugin-swr/recipes/skip-a-request-until-ready.md): Use shouldFetch on a generated SWR hook to hold off a request until its parameters are ready. - [Immutable requests](/plugins/plugin-swr/recipes/immutable-requests.md): Fetch data that never changes once loaded by passing immutable to a generated SWR hook. ### Reference - [Options](/plugins/plugin-ts/reference/options.md): Configuration options for @kubb/plugin-ts. ### Recipes - [Tree-shakeable enums](/plugins/plugin-ts/recipes/tree-shakeable-enums.md): Emit each OpenAPI enum as an as const object so bundlers drop the values you never use. - [Map spec types to native TS](/plugins/plugin-ts/recipes/map-spec-types-to-native-ts.md): Replace a schema type handler to build your own TypeScript AST node for it. ### Reference - [Options](/plugins/plugin-vue-query/reference/options.md): Configuration options for @kubb/plugin-vue-query. ### Guide - [Call operations](/plugins/plugin-vue-query/guide/calling-operations.md): Use the TanStack Query composables Kubb generates from your OpenAPI spec, with reactive parameters and typed data and error state. ### Recipes - [Infinite scroll query](/plugins/plugin-vue-query/recipes/infinite-scroll-query.md): Generate useInfiniteQuery composables for cursor-based pagination with @kubb/plugin-vue-query. - [Custom query keys](/plugins/plugin-vue-query/recipes/custom-query-keys.md): Control the queryKey array a useQuery composable uses for caching and invalidation with @kubb/plugin-vue-query. - [Reactive params that refetch](/plugins/plugin-vue-query/recipes/reactive-params-that-refetch.md): Pass a ref or getter to a generated Vue Query composable so the query re-runs when the value changes. ### Reference - [Options](/plugins/plugin-zod/reference/options.md): Configuration options for @kubb/plugin-zod. ### Recipes - [Zod as the single source of truth](/plugins/plugin-zod/recipes/zod-as-the-single-source-of-truth.md): Export a z.infer alias next to every schema so Zod carries the types and you drop plugin-ts. - [Tree-shakeable schemas with Zod Mini](/plugins/plugin-zod/recipes/tree-shakeable-schemas-with-zod-mini.md): Generate Zod Mini schemas on the functional API so bundlers tree-shake the validators you never call. - [Coerce query and form input](/plugins/plugin-zod/recipes/coerce-query-and-form-input.md): Scope z.coerce to a single tag with override so only matching operations coerce their schemas. - [Validate every API response](/plugins/plugin-zod/recipes/validate-every-api-response.md): Point a Fetch client at the generated Zod schemas to validate every response body at runtime. - [Encode a custom type on requests](/plugins/plugin-zod/recipes/encode-a-custom-type-on-requests.md): Use a direction-aware printer node so a domain type decodes on responses and encodes back to the wire format on requests, including through a $ref. ### Reference - [Options](/adapters/adapter-oas/reference/options.md): Configuration options for @kubb/adapter-oas covering spec validation, content type, the server base URL, discriminators, enums, and how OpenAPI types map to TypeScript. ### Reference - [Options](/parsers/parser-md/reference/options.md): Configuration options for @kubb/parser-md. The Kubb Markdown parser takes no options. ### Reference - [Options](/parsers/parser-ts/reference/options.md): Configuration options for @kubb/parser-ts. Rewrite the import and export extensions the TypeScript parser emits. ### Getting Started - [Introduction](/docs/5.x/getting-started/introduction.md): Kubb is the meta framework for code generation. A plugin-based system that turns any API specification into TypeScript types, API clients, hooks, validators, and mocks. - [Installation](/docs/5.x/getting-started/installation.md): Install Kubb in any Node.js project. Use the interactive kubb init wizard or set up manually with the kubb package and a handful of plugins. - [Basic Usage](/docs/5.x/getting-started/basic-usage.md): Write your first kubb.config.ts, pick a few plugins, run kubb generate and import the generated types, client and hooks in your app. ### Guide - [Recipes](/docs/5.x/guide/recipes.md): Copy-paste kubb.config.ts configurations for the most common stacks including TypeScript, React Query, Zod, MSW, multi-spec setups and more. - [Kubb vs orval, HeyAPI, and openapi-typescript](/docs/5.x/guide/comparison.md): Feature-by-feature comparison of Kubb against orval, HeyAPI, and openapi-typescript. #### Concepts - [Architecture](/docs/5.x/guide/concepts/architecture.md): How Kubb generates code. The adapter, AST, plugins, parsers, and storage form one layered pipeline from spec to output files. - [Kit - The Plugin Authoring Toolkit](/docs/5.x/guide/concepts/kit.md): kubb/kit is the authoring layer of Kubb. It is the one import a developer uses to build plugins, generators, resolvers, adapters, parsers, renderers, and storage backends, with the ast and core helpers those pieces lean on. - [Plugins - Build Custom Generators for Any Spec](/docs/5.x/guide/concepts/plugins.md): Build Kubb plugins that hook into the lifecycle, register generators, declare resolvers, and emit files. The hook-style definePlugin API mirrors Astro integrations. - [Generators - How a Plugin Turns the AST Into Files](/docs/5.x/guide/concepts/generators.md): A generator is the piece of a plugin that walks the AST and emits files. One plugin can register several, each handling schemas, single operations, or the whole operation set. - [Resolvers - How Kubb Names Generated Files](/docs/5.x/guide/concepts/resolvers.md): A resolver is the single source of truth for a plugin's file names and output paths. Other plugins read it by name so they can import each other's output without hard-coding paths. - [Renderers - How Generators Emit Files](/docs/5.x/guide/concepts/renderers.md): A renderer turns what a generator returns into FileNodes. Kubb ships a JSX renderer, and you build your own only when you emit through a different templating format. - [Adapters - How Kubb Reads Any Specification](/docs/5.x/guide/concepts/adapters.md): An adapter is the only part of Kubb that understands the input format. It converts a spec like OpenAPI into the universal AST, so every plugin works regardless of the source. - [Parsers - How Kubb Turns the AST into Source Code](/docs/5.x/guide/concepts/parsers.md): Parsers are Kubb's output layer. They convert the universal AST into language-specific source code, so the same plugins can target TypeScript, Python, or any other language. - [Storage - How Kubb Decides Where Files Land](/docs/5.x/guide/concepts/storage.md): Understand Kubb's storage layer. The driver decouples code generation from its destination, so the same build can target disk, memory, or any backend you write. - [AST - Why Kubb Uses a Universal Tree](/docs/5.x/guide/concepts/ast.md): How Kubb's universal Abstract Syntax Tree decouples input formats like OpenAPI from the generators that emit code, so one plugin works against any spec. #### Going further - [Create your first plugin](/docs/5.x/guide/going-further/creating-plugins.md): Learn how to build a Kubb plugin from scratch. Step-by-step guide covering setup, lifecycle hooks, generators, and publishing. - [Use Kubb with Claude AI - AI Integration Guide](/docs/5.x/guide/going-further/claude-mcp-plugin.md): Integrate Kubb with Claude AI for enhanced code generation. AI-powered OpenAPI analysis and code suggestions. - [Write a macro](/docs/5.x/guide/going-further/macros.md): A macro is a named, composable transform over Kubb's AST. Macros rewrite schema and operation nodes before generators print code, and the same macro works across every adapter and every output target. - [Override a printer](/docs/5.x/guide/going-further/printers.md): Printers turn Kubb's AST schema nodes into generated code. The printer option on plugin-ts, plugin-zod, and plugin-faker replaces the handler for a single schema type, so you change what one plugin emits without forking it. - [Override a resolver](/docs/5.x/guide/going-further/resolvers.md): Resolvers name every symbol and file Kubb generates. The resolver option on each code-generating plugin patches a single naming rule, so you change what things are called or where files land without forking the plugin. - [Add barrel files support](/docs/5.x/guide/going-further/barrel-files.md): Generate index.ts barrel files for every plugin output directory with @kubb/plugin-barrel, the post-enforced plugin built into Kubb. #### Integrations - [Integrations](/docs/5.x/guide/integrations.md): Run Kubb from somewhere other than the CLI. Generate inside your bundler with Vite, Rollup, Rolldown, webpack, Rspack, esbuild, Farm, Nuxt or Astro, or from the browser with Kubb Studio. - [Kubb Studio](/docs/5.x/guide/integrations/studio.md): Connect a Kubb project to Kubb Studio and generate from the browser while Kubb runs on your own machine. Covers connecting, permissions, headless runs, and self-hosted instances. - [Run Kubb with Vite](/docs/5.x/guide/integrations/vite.md): Run Kubb as part of your Vite build with kubb/vite. - [Run Kubb with Rollup](/docs/5.x/guide/integrations/rollup.md): Run Kubb as part of your Rollup build with kubb/rollup. - [Run Kubb with Rolldown](/docs/5.x/guide/integrations/rolldown.md): Run Kubb as part of your Rolldown build with kubb/rolldown. - [Run Kubb with webpack](/docs/5.x/guide/integrations/webpack.md): Run Kubb as part of your webpack build with kubb/webpack. - [Run Kubb with Rspack](/docs/5.x/guide/integrations/rspack.md): Run Kubb as part of your Rspack build with kubb/rspack. - [Run Kubb with esbuild](/docs/5.x/guide/integrations/esbuild.md): Run Kubb as part of your esbuild build with kubb/esbuild. - [Run Kubb with Farm](/docs/5.x/guide/integrations/farm.md): Run Kubb as part of your Farm build with kubb/farm. - [Run Kubb with Nuxt](/docs/5.x/guide/integrations/nuxt.md): Run Kubb as part of your Nuxt application with the kubb/nuxt module. - [Run Kubb with Astro](/docs/5.x/guide/integrations/astro.md): Run Kubb as part of your Astro project with the kubb/astro integration. ### Reference - [Configuration](/docs/5.x/reference/configuration.md): Reference for kubb.config.ts with every option, default and example for the Kubb v5 UserConfig. - [Commands](/docs/5.x/reference/commands.md): Reference for every command and flag exposed by the kubb CLI including init, generate, validate, mcp and studio. - [Kit API](/docs/5.x/reference/kit.md): The kubb/kit reference for authoring plugins, generators, resolvers, renderers, adapters, parsers, and storage backends, plus the ast namespace, Diagnostics, the engine surface, and the testing helpers. - [JSX renderer](/docs/5.x/reference/jsx.md): The kubb/jsx surface backed by @kubb/renderer-jsx. jsxRenderer, the built-in components, and the JSX runtime for component-based code generation. - [Telemetry](/docs/5.x/reference/telemetry.md): Learn what anonymous usage data Kubb collects, how to opt out, and how the data improves the tool. - [Diagnostics](/docs/5.x/reference/diagnostics.md): Reference for Kubb's diagnostic codes, the stable codes Kubb prints when a build fails, with causes and fixes. #### Commands - [kubb init](/docs/5.x/reference/commands/init.md): The init command bootstraps a fresh Kubb project with an interactive wizard. - [kubb generate](/docs/5.x/reference/commands/generate.md): The generate command runs the Kubb code-generation pipeline based on your kubb.config.ts. - [kubb validate](/docs/5.x/reference/commands/validate.md): The validate command checks that a Swagger/OpenAPI document is valid without running the full pipeline. - [kubb mcp](/docs/5.x/reference/commands/mcp.md): The mcp command starts a Model Context Protocol server so LLM clients can interact with your schemas and trigger generation. - [kubb studio](/docs/5.x/reference/commands/studio.md): The studio command connects a project to Kubb Studio, so you can trigger generation from the browser while Kubb keeps running on your own machine. #### Kit - [Plugins](/docs/5.x/reference/kit/plugins.md): definePlugin wraps a factory into a typed Plugin, with all lifecycle handlers under one hooks object and the KubbPluginSetupContext that registers generators, resolvers, macros, and options. - [Generators](/docs/5.x/reference/kit/generators.md): defineGenerator declares a named generator unit that walks the AST and emits files. Covers the schema, operation, and operations methods and the GeneratorContext passed to each. - [Resolvers](/docs/5.x/reference/kit/resolvers.md): createResolver builds a Resolver that controls file naming and path resolution for a plugin, with auto-injected defaults under resolver.default and Resolver.merge for layering overrides. - [Renderers](/docs/5.x/reference/kit/renderers.md): createRenderer wraps a builder into a Renderer factory for generators that emit something other than plain FileNodes, alongside jsxRenderer, the React-free JSX renderer shipped in kubb/jsx. - [Adapters](/docs/5.x/reference/kit/adapters.md): createAdapter builds an adapter that converts an input specification into the universal AST. Covers the Adapter interface, the built-in OpenAPI adapter, and writing your own. - [Parsers](/docs/5.x/reference/kit/parsers.md): defineParser creates a parser that converts a generated file AST into the source string written to disk. Covers the Parser interface, the built-in TypeScript parser, and adding your own. - [Storage](/docs/5.x/reference/kit/storage.md): Storage backends decide where generated files are written. Covers createStorage, the Storage interface, and the built-in fsStorage and memoryStorage backends. - [AST and node builders](/docs/5.x/reference/kit/ast.md): The ast namespace groups the factory node builders, the transform and collect visitors, the guards, the ref and naming helpers, the macro engine, and the printer helper behind one import. - [Diagnostics](/docs/5.x/reference/kit/diagnostics.md): Diagnostics is the namespace a plugin or adapter uses to build and narrow the structured errors Kubb collects during a build, each carrying a stable code, a severity, and a location. - [Engine and configuration](/docs/5.x/reference/kit/engine.md): The engine that runs your plugins comes from the kubb package and its kubb/config subpath. Covers defineConfig, createKubb, the Kubb instance, BuildOutput, and narrowing config.input. - [Lifecycle hooks](/docs/5.x/reference/kit/hooks.md): Every kubb:* hook a build fires, its payload, and when it fires. Listen with kubb.hooks.hook(name, handler) or from a plugin's hooks map. - [Testing](/docs/5.x/reference/kit/testing.md): kubb/kit/testing is a separate subpath for the Vitest-backed helpers used to test plugins, generators, and adapters, kept apart from kubb/kit so the authoring toolkit never pulls in Vitest. ### Community - [Contributing](/docs/5.x/community/contributing.md): A concise guide to contributing to Kubb core and Kubb plugins. - [FAQ](/docs/5.x/community/faq.md): Frequently asked questions about Kubb, covering compatibility, generated code, customization, and plugins. ### Migration - [Migration: @kubb/adapter-oas](/docs/5.x/migration/adapter-oas.md): Configuration changes for @kubb/adapter-oas when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-ts](/docs/5.x/migration/plugin-ts.md): Configuration and generated-output changes for @kubb/plugin-ts when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-zod](/docs/5.x/migration/plugin-zod.md): Configuration and generated-output changes for @kubb/plugin-zod when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-faker](/docs/5.x/migration/plugin-faker.md): Configuration and generated-output changes for @kubb/plugin-faker when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-client removed](/docs/5.x/migration/plugin-client.md): @kubb/plugin-client is removed. Migrate to @kubb/plugin-axios or @kubb/plugin-fetch. - [Migration: @kubb/plugin-react-query](/docs/5.x/migration/plugin-react-query.md): Configuration and generated-output changes for @kubb/plugin-react-query when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-vue-query](/docs/5.x/migration/plugin-vue-query.md): Configuration and generated-output changes for @kubb/plugin-vue-query when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-msw](/docs/5.x/migration/plugin-msw.md): Configuration and generated-output changes for @kubb/plugin-msw when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-swr](/docs/5.x/migration/plugin-swr.md): Configuration changes for @kubb/plugin-swr when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-cypress](/docs/5.x/migration/plugin-cypress.md): Changes for @kubb/plugin-cypress when migrating from Kubb v4 to v5. - [Migration: @kubb/plugin-mcp](/docs/5.x/migration/plugin-mcp.md): Changes for @kubb/plugin-mcp when migrating from Kubb v4 to v5. ### AI - [Set up the Claude Code plugin](/docs/5.x/ai/claude.md): The Kubb Claude Code plugin adds slash commands and an agent that run Kubb code generation from inside Claude Code. - [Use Kubb with Context7](/docs/5.x/ai/context7.md): Connect Context7 to your AI assistant and use current Kubb documentation when generating code or configuring Kubb. - [Set up the MCP server](/docs/5.x/ai/mcp.md): Connect AI editors and agents to Kubb's local MCP server. Configure Claude Desktop, Cursor, VS Code, and other MCP-capable clients to run Kubb tools directly. - [LLMS.txt - AI](/docs/5.x/ai/llmstxt.md): Kubb publishes llms.txt and llms-full.txt so LLMs can consume the full documentation in a single request. Learn how to point your AI assistant at these files. ### Other - [About Kubb - The Meta Framework for Code Generation](/about.md): Learn about Kubb's origin, philosophy, and plugin-based architecture. Discover why it's the meta framework for code generation and why it's named after the Swedish lawn game Kubb. - [Adapters - Explore the Ecosystem](/adapters.md): Discover official and community adapters for Kubb. Parse OpenAPI, GraphQL, and other specifications into Kubb's universal Abstract Syntax Tree. - [Authenticate your API client](/snippets/how-to/authentication.md) - [Call operations](/snippets/how-to/calling-operations.md) - [Changelog](/docs/5.x/changelog.md): Track all updates, features, and improvements to Kubb - [Contributors - OpenAPI Generator Community](/contributors.md): Meet the developers and contributors building Kubb, the TypeScript code generator for OpenAPI specifications. Join our open-source community. - [Downgrade int64 to a plain number](/plugins/plugin-zod/recipes/downgrade-int64-to-a-plain-number.md): Replace the bigint printer node so int64 fields validate as z.number() instead of the default z.bigint(). - [Ecosystem](/docs/5.x/resources/ecosystem.md): Discover projects built with Kubb, articles featuring Kubb, and community resources. See how developers use Kubb for OpenAPI code generation. - [Ecosystem - Projects, Articles & Community](/ecosystem.md): Discover projects built with Kubb, articles featuring Kubb, and community resources. See how teams use Kubb for OpenAPI code generation. - [Error handling](/snippets/how-to/error-handling.md) - [Interceptors](/snippets/how-to/interceptors.md) - [Kubb Axios Plugin](/plugins/plugin-axios.md): Generates a type-safe axios client from your OpenAPI spec, one async function per operation, so each call stays in sync with the API. - [Kubb Barrel Plugin](/plugins/plugin-barrel.md): Generates an index.ts barrel for every plugin output and one root barrel, so you import all generated code from a single entry point. Ships with Kubb, but only generates barrels once output.barrel is configured. - [Kubb Cypress Plugin](/plugins/plugin-cypress.md): Generates a typed cy.request() wrapper per OpenAPI operation so your Cypress tests call the API through generated helpers and catch broken calls at compile time. - [Kubb Faker Plugin](/plugins/plugin-faker.md): Generates a Faker.js mock-data factory for every schema in your OpenAPI spec. Use the factories in tests, Storybook, and local development without a running backend. - [Kubb Fetch Plugin](/plugins/plugin-fetch.md): Generates a type-safe Fetch API client from your OpenAPI spec, one async function per operation, so each call stays in sync with the API. - [Kubb Markdown Parser](/parsers/parser-md.md): Emits `.md` and `.markdown` files from the Kubb AST, joining source blocks as plain markdown and prepending YAML frontmatter from a file's meta. - [Kubb MCP Plugin](/plugins/plugin-mcp.md): Generates a Model Context Protocol server from your OpenAPI spec, so AI assistants can call each operation as a typed tool. - [Kubb MSW Plugin](/plugins/plugin-msw.md): Generates MSW request handlers from your OpenAPI spec so you can mock the API in tests and during local development. - [Kubb OpenAPI Adapter](/adapters/adapter-oas.md): Reads an OpenAPI 2.0, 3.0, or 3.1 spec and converts every schema and operation into the AST that Kubb plugins generate from, so one adapter feeds the whole build. - [Kubb React Query Plugin](/plugins/plugin-react-query.md): Generates typed TanStack Query hooks for React from your OpenAPI spec, so reads and writes call your API through useQuery, useMutation, and useInfiniteQuery without hand-written boilerplate. - [Kubb Redoc Plugin](/plugins/plugin-redoc.md): Generates a single-file HTML page from your OpenAPI spec with Redoc, rebuilt on every Kubb run so the docs match the spec your code comes from. - [Kubb SWR Plugin](/plugins/plugin-swr.md): Generates typed SWR hooks from your OpenAPI spec, so data fetching stays in sync with the API. - [Kubb TypeScript Parser](/parsers/parser-ts.md): Prints the Kubb AST to TypeScript source with the official TypeScript compiler, so every plugin writes real `.ts`, `.tsx`, `.js`, and `.jsx` files. - [Kubb TypeScript Plugin](/plugins/plugin-ts.md): Generates TypeScript types and interfaces from your OpenAPI spec, the typed foundation the other Kubb plugins build on. - [Kubb Vue Query Plugin](/plugins/plugin-vue-query.md): Generates TanStack Query composables for Vue from your OpenAPI spec, so every read and write is a typed useQuery, useInfiniteQuery, or useMutation. - [Kubb Zod Plugin](/plugins/plugin-zod.md): Generates Zod v4 schemas from your OpenAPI spec so you validate API responses, form input, and query params at runtime. - [KUBB_ADAPTER_REQUIRED](/docs/5.x/reference/diagnostics/kubb-adapter-required.md): The KUBB_ADAPTER_REQUIRED diagnostic fires when an action needs an adapter but none is configured. - [KUBB_CLEAN_ROOT](/docs/5.x/reference/diagnostics/kubb-clean-root.md): The KUBB_CLEAN_ROOT diagnostic fires when output.clean would delete the project root instead of only the generated code. - [KUBB_DEPRECATED](/docs/5.x/reference/diagnostics/kubb-deprecated.md): The KUBB_DEPRECATED diagnostic flags a schema or operation marked deprecated in your OpenAPI document. - [KUBB_FORMAT_FAILED](/docs/5.x/reference/diagnostics/kubb-format-failed.md): The KUBB_FORMAT_FAILED diagnostic fires when the formatter pass over the generated files fails. - [KUBB_INPUT_NOT_FOUND](/docs/5.x/reference/diagnostics/kubb-input-not-found.md): The KUBB_INPUT_NOT_FOUND diagnostic fires when the file set as input (or passed to kubb generate) cannot be read. - [KUBB_INPUT_REQUEST_FAILED](/docs/5.x/reference/diagnostics/kubb-input-request-failed.md): The KUBB_INPUT_REQUEST_FAILED diagnostic fires when a URL set as input answers with a 4xx or 5xx status instead of the OpenAPI document. - [KUBB_INPUT_REQUIRED](/docs/5.x/reference/diagnostics/kubb-input-required.md): The KUBB_INPUT_REQUIRED diagnostic fires when an adapter is configured but no input was provided. - [KUBB_INPUT_UNREACHABLE](/docs/5.x/reference/diagnostics/kubb-input-unreachable.md): The KUBB_INPUT_UNREACHABLE diagnostic fires when a URL set as input never answers, so the request fails before a status comes back. - [KUBB_INVALID_DOCUMENT](/docs/5.x/reference/diagnostics/kubb-invalid-document.md): The KUBB_INVALID_DOCUMENT diagnostic fires when the resolved input is not an OpenAPI or Swagger document. - [KUBB_INVALID_PLUGIN_OPTIONS](/docs/5.x/reference/diagnostics/kubb-invalid-plugin-options.md): The KUBB_INVALID_PLUGIN_OPTIONS diagnostic fires when a plugin is configured with options that cannot be honored, such as output.mode 'file' paired with a group option. - [KUBB_INVALID_SERVER_VARIABLE](/docs/5.x/reference/diagnostics/kubb-invalid-server-variable.md): The KUBB_INVALID_SERVER_VARIABLE diagnostic, raised when a server URL variable value is not one of the values its enum allows. - [KUBB_LEGACY_INPUT](/docs/5.x/reference/diagnostics/kubb-legacy-input.md): The KUBB_LEGACY_INPUT diagnostic fires when input still uses the v4 path or data wrapper. - [KUBB_LINT_FAILED](/docs/5.x/reference/diagnostics/kubb-lint-failed.md): The KUBB_LINT_FAILED diagnostic fires when the linter pass over the generated files fails. - [KUBB_PATH_TRAVERSAL](/docs/5.x/reference/diagnostics/kubb-path-traversal.md): The KUBB_PATH_TRAVERSAL diagnostic fires when a resolved output path escapes the configured output directory. - [KUBB_PERFORMANCE](/docs/5.x/reference/diagnostics/kubb-performance.md): The KUBB_PERFORMANCE diagnostic records how long a plugin took, feeding the run summary and timing bars. - [KUBB_PLUGIN_FAILED](/docs/5.x/reference/diagnostics/kubb-plugin-failed.md): The KUBB_PLUGIN_FAILED diagnostic fires when a plugin throws while generating or reports an error through ctx.error. - [KUBB_PLUGIN_INFO](/docs/5.x/reference/diagnostics/kubb-plugin-info.md): The KUBB_PLUGIN_INFO diagnostic carries an informational message a plugin reported through ctx.info. - [KUBB_PLUGIN_NOT_FOUND](/docs/5.x/reference/diagnostics/kubb-plugin-not-found.md): The KUBB_PLUGIN_NOT_FOUND diagnostic, raised when a plugin another plugin depends on is missing from your kubb.config.ts. - [KUBB_PLUGIN_WARNING](/docs/5.x/reference/diagnostics/kubb-plugin-warning.md): The KUBB_PLUGIN_WARNING diagnostic carries a non-fatal warning a plugin reported through ctx.warn. - [KUBB_POST_GENERATE_FAILED](/docs/5.x/reference/diagnostics/kubb-post-generate-failed.md): The KUBB_POST_GENERATE_FAILED diagnostic fires when a post-generate output.postGenerate command exits with a non-zero status. - [KUBB_REF_NOT_FOUND](/docs/5.x/reference/diagnostics/kubb-ref-not-found.md): The KUBB_REF_NOT_FOUND diagnostic, raised when a $ref in your OpenAPI document points at a definition Kubb cannot resolve. - [KUBB_UNKNOWN](/docs/5.x/reference/diagnostics/kubb-unknown.md): The KUBB_UNKNOWN diagnostic, a build error that does not yet carry a specific code. - [KUBB_UNSUPPORTED_FORMAT](/docs/5.x/reference/diagnostics/kubb-unsupported-format.md): The KUBB_UNSUPPORTED_FORMAT diagnostic fires when a schema uses a format Kubb does not map to a specific type. - [KUBB_UPDATE_AVAILABLE](/docs/5.x/reference/diagnostics/kubb-update-available.md): The KUBB_UPDATE_AVAILABLE diagnostic tells you a newer Kubb version is published on npm. - [kubb.dev](/CHANGELOG.md) - [Override a printer](/snippets/how-to/printers.md) - [Override a resolver](/snippets/how-to/resolvers.md) - [Parsers - Explore the Ecosystem](/parsers.md): Discover official and community parsers for Kubb. Convert Kubb's universal AST into TypeScript, JavaScript and other source files. - [Plugins - Explore the Ecosystem](/plugins.md): Discover official and community plugins for Kubb. Generate TypeScript types, TanStack Query hooks, Zod schemas, MSW mocks, and more from your OpenAPI specification. - [Prefix every generated type name](/plugins/plugin-ts/recipes/prefix-every-generated-type-name.md): Override resolver.name so every type plugin-ts emits carries a shared prefix, useful for avoiding collisions with hand-written types. - [Prefix every schema type name](/plugins/plugin-zod/recipes/prefix-every-schema-type-name.md): Override resolver.schema.typeName so the z.infer alias plugin-zod exports for every schema carries a shared prefix. - [Redirecting…](/404.md) - [Serialization and parsing](/snippets/how-to/serialization.md) - [Server-sent events](/snippets/how-to/server-sent-events.md) - [Set your own baseURL](/snippets/how-to/base-url.md) - [Strip descriptions with a macro](/plugins/plugin-ts/recipes/strip-descriptions-with-a-macro.md): Register a macro through the macros option to drop every schema description before plugin-ts prints its JSDoc. - [Strip descriptions with a macro](/plugins/plugin-zod/recipes/strip-descriptions-with-a-macro.md): Register a macro through the macros option to drop every schema description before plugin-zod prints a .describe() call. - [Support Kubb - Sponsor OpenAPI TypeScript Code Generator](/sponsors.md): Support Kubb's development and help us build better OpenAPI code generation tools. Become a sponsor and get your name featured. - [Untitled](/snippets/how-to/include.md) - [Untitled](/snippets/how-to/macros-option.md) - [Untitled](/snippets/how-to/barrel.md) - [Untitled](/snippets/how-to/exclude.md) - [Untitled](/snippets/how-to/query-errors-transport.md) - [Untitled](/snippets/how-to/override.md) - [Untitled](/snippets/how-to/output-banner.md) - [Untitled](/snippets/how-to/grouping.md) - [Untitled](/snippets/how-to/output-footer.md) - [Use a custom transport](/snippets/how-to/transport.md) - [Write a macro](/snippets/how-to/macros.md)