@kubb/cli
v4.20.0
Published
Command-line interface for Kubb, enabling easy generation of TypeScript, React-Query, Zod, and other code from OpenAPI specifications.
Downloads
247,115
Maintainers
Readme
Commands
kubb init
Initialize a new Kubb project with an interactive setup wizard.
npx kubb initThis command will:
- Detect or create a
package.jsonif it doesn't exist - Prompt you for your OpenAPI specification path
- Ask for the output directory for generated files
- Let you select which Kubb plugins to use
- Install the selected packages using your package manager (npm, pnpm, yarn, or bun)
- Generate a
kubb.config.tsfile with your chosen configuration
kubb generate
Generate files based on your kubb.config.ts configuration.
npx kubb generateOptions:
-c, --config <path>- Path to the Kubb config file-l, --logLevel <level>- Set log level (silent, info, verbose, debug)-w, --watch- Watch mode based on the input file-d, --debug- Enable debug mode-v, --verbose- Enable verbose mode-s, --silent- Enable silent mode
kubb validate
Validate a Swagger/OpenAPI file.
npx kubb validate <path-to-openapi>kubb mcp
Start the MCP server to enable the MCP client to interact with the LLM.
npx kubb mcpSupporting Kubb
Kubb uses an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
