Skip to main content

Command Routing

Applications are the top-level object that encapsulate all of the logic for a given CLI application. They can be built with a single command as the root or a route map of nested subcommands.

caution

Depending on which integrations are provided, the application may automatically include additional flags and functionality. For example, if version information is provided, then the application will automatically include a --version flag (with alias -v) to print the current version of the application. None of the nested commands can be specified with flags or aliases that conflict with the provided integrations, and doing so will cause an error to be thrown when the application is built.

When defining an application, there are several configurations that should be specified (although all have default values).