method BaseCLI.prototype.addCommand
BaseCLI.prototype.addCommand(command: Command): void

Add a Command to the CLI's CommandRegistry.

If only one non-modifier Command is added, the CLI will operate as a single command CLI and the provided command will be set as a default command. If more than one command is added, the CLI will operate as a multi-command CLI. In this case the default command will be set to a help command.

Parameters

command: Command

the Command to add.

Return Type

void

Usage

import BaseCLI from ".";