@kubb/cli
The Kubb CLI allows you to generate files based on the kubb.config.ts
configuration file. Upon startup, Kubb displays the progress of the plugin execution, the file writing, and the results of each hook once the generation process is complete.
Installation
bun add @kubb/cli
pnpm add @kubb/cli
npm install @kubb/cli
yarn add @kubb/cli
Usage
kubb --config kubb.config.js
USAGE kubb generate
COMMANDS
generate [input] Generate files based on a 'kubb.config.ts' file
Use kubb <command> --help for more information about a command.
Generate
TIP
kubb generate
and kubb
will call the same generate functionality.
USAGE kubb generate [OPTIONS]
OPTIONS
-c, --config Path to the Kubb config
-l, --logLevel=<silent|info|debug> Info, silent or debug
-w, --watch Watch mode based on the input file
-d, --debug Override logLevel to debug
-h, --help Show help
Path of the input file(overrides the one in kubb.config.js
)
kubb petStore.yaml
Options
--config (-c)
INFO
Path to the Kubb config.
kubb --config kubb.config.ts
--log-level (-l)
INFO
Type of the logging(overrides the one in kubb.config.js
).
silent
will suppresses all log messages, warnings, and errors, minimizing console output. info
will log all warnings, errors and info messages. debug
will show all message from info
and every plugin being executed(with meta-data being written to log files).
kubb --log-level info
--debug
TIP
Debug mode will create 2 log files:
.kubb/kubb-DATE_STRING.log
.kubb/kubb-files.log
INFO
Alias for kubb generate --log-level debug
kubb --debug
--watch (-w)
Watch mode based on the input file.
INFO
kubb --watch
--version (-v)
Output the version number.
INFO
kubb --version
--help (-h)
Display the help.
INFO
kubb --help