Skip to content

@kubb/cli 🦙

Installation

shell
bun add @kubb/cli
shell
pnpm add @kubb/cli
shell
npm install @kubb/cli
shell
yarn add @kubb/cli

Usage

shell
kubb --bun --config kubb.config.js
bkubb --config kubb.config.js
sh
kubb --config kubb.config.js
mdx
kubb/1.2.1

Usage:
  $ kubb [input]

Commands:
  [input]           Path of the input file(overrides the one in `kubb.config.js`)
  generate [input]  Path of the input file(overrides the one in `kubb.config.js`)

For more info, run any command with the `--help` flag:
  $ kubb --help
  $ kubb generate --help

Options:
  -h, --help     Display this message
  -v, --version  Display version number

Generate

TIP

kubb generate and kubb is the same.

mdx
kubb/1.2.1

Usage:
  $ kubb generate [input]

Options:
  -c, --config <path>     Path to the Kubb config
  -l, --log-level <type>  Info, silent or debug
  -w, --watch             Watch mode based on the input file
  -h, --help              Display this message
  -b, --bun               Run Kubb with Bun

Path of the input file(overrides the one in kubb.config.js)

sh
kubb petStore.yaml

Options

--config (-c)

INFO

Path to the Kubb config.

sh
kubb --config kubb.config.ts

--log-level (-l)

INFO

Type of the logging(overrides the one in kubb.config.js).

silent will hide all information that is not relevant

info will show all information possible(not related to the PluginManager)

debug will show all information possible(related to the PluginManager), handy for seeing logs

sh
kubb --log-level info

--debug

INFO

Alias for kubb generate log-level debug

sh
kubb --debug

--watch (-w)

Watch mode based on the input file.

INFO

sh
kubb --watch

--version (-v)

Output the version number.

INFO

sh
kubb --version

--help (-h)

Display the help.

INFO

sh
kubb --help

--bun (-b)

Run with Bun

INFO

sh
kubb --bun

See getting-started on how to configure Kubb.

Released under the MIT License.