🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@kubb/cli

Package Overview
Dependencies
Maintainers
1
Versions
1261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/cli

Command-line interface for Kubb, enabling easy generation of TypeScript, React-Query, Zod, and other code from OpenAPI specifications.

latest
Source
npmnpm
Version
4.37.7
Version published
Weekly downloads
115K
7.74%
Maintainers
1
Weekly downloads
 
Created
Source

Kubb Cli

Kubb logo

npm version npm downloads Coverage License Sponsors

View Demo · Documentation · Report Bug · Request Feature

Commands

kubb init

Initialize a new Kubb project with an interactive setup wizard.

npx kubb init

Use the -y / --yes flag to skip all prompts and accept the defaults:

npx kubb init -y

Defaults when using -y:

  • Input path: ./openapi.yaml
  • Output path: ./src/gen
  • Plugins: OpenAPI Parser + TypeScript

This command will:

  • Detect or create a package.json if it doesn't exist
  • Prompt you for your OpenAPI specification path (default: ./openapi.yaml)
  • Ask for the output directory for generated files (default: ./src/gen)
  • Let you select which Kubb plugins to use (default: OpenAPI Parser + TypeScript)
  • Install the selected packages using your package manager (npm, pnpm, yarn, or bun)
  • Generate a kubb.config.ts file with your chosen configuration

kubb generate

Generate files based on your kubb.config.ts configuration.

npx kubb generate

Options:

  • -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 mcp

Supporting 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:

My sponsors

Keywords

cli

FAQs

Package last updated on 13 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts