This monorepo contains all official Kubb plugins for code generation from OpenAPI specifications. It follows the same monorepo structure used in the main kubb-labs/kubb repository.
Kubb v5 OpenAPI configs use @kubb/adapter-oas as the adapter layer.
| Package | Version | Description |
|---|---|---|
@kubb/plugin-ts |
TypeScript types and interfaces generation |
| Package | Version | Description |
|---|---|---|
@kubb/plugin-client |
API client generation (Axios, Fetch) |
| Package | Version | Description |
|---|---|---|
@kubb/plugin-zod |
Zod schema generation for runtime validation |
| Package | Version | Description |
|---|---|---|
@kubb/plugin-react-query |
TanStack Query hooks for React | |
@kubb/plugin-vue-query |
TanStack Query composables for Vue |
| Package | Version | Description |
|---|---|---|
@kubb/plugin-faker |
Faker.js mock data generation | |
@kubb/plugin-msw |
Mock Service Worker handlers | |
@kubb/plugin-cypress |
Cypress e2e test generation |
| Package | Version | Description |
|---|---|---|
@kubb/plugin-redoc |
ReDoc API documentation generation | |
@kubb/plugin-mcp |
Model Context Protocol tools for AI assistants |
| Example | Description |
|---|---|
typescript |
Generate TypeScript types |
client |
Generate API clients with Axios |
fetch |
Generate API clients with Fetch |
zod |
Generate Zod validation schemas |
react-query |
Generate React Query hooks |
vue-query |
Generate Vue Query composables |
faker |
Generate Faker.js mock data |
msw |
Generate MSW handlers |
cypress |
Generate Cypress tests |
mcp |
Generate MCP tools |
advanced |
Advanced multi-plugin configuration |
plugins/
├── packages/ # Kubb plugins
│ ├── plugin-ts/ # TypeScript generation
│ ├── plugin-client/ # API client generation
│ ├── plugin-zod/ # Zod schemas
│ ├── plugin-react-query/# React Query hooks
│ ├── plugin-vue-query/ # Vue Query composables
│ ├── plugin-faker/ # Faker.js mocks
│ ├── plugin-msw/ # MSW handlers
│ ├── plugin-cypress/ # Cypress tests
│ ├── plugin-redoc/ # ReDoc documentation
│ └── plugin-mcp/ # MCP integration
├── internals/ # Shared internal utilities (not published)
│ ├── utils/ # @internals/utils
│ └── tanstack-query/ # @internals/tanstack-query
├── examples/ # Usage examples
└── tests/ # Performance and e2e tests
pnpm install# Build all packages
pnpm build
# Build examples
pnpm build:examples# Run all tests
pnpm test
# Watch mode
pnpm test:watchpnpm typecheckWant to contribute to a plugin or add a new one? Here's how:
-
Create your package under
packages/following the existing plugin layout:packages/ └── plugin-your-name/ ├── src/ │ ├── index.ts │ ├── plugin.ts │ └── generators/ ├── package.json ├── tsconfig.json ├── tsdown.config.ts └── vitest.config.ts -
Use the same tooling conventions:
tsdownfor buildingvitestfor testingoxlintfor linting/formatting- Extend
../../tsconfig.jsonin yourtsconfig.json
-
Add an example under
examples/that demonstrates your plugin. -
Open a pull request with your changes.
See CONTRIBUTING.md for full details.