@flowscripter/dynamic-cli-framework
    Preparing search index...

    Class BaseCLI

    Base implementation of a CLI.

    By default the following service providers are added:

    NOTE: The ConfigurationServiceProvider will not be added if the required allow-read and allow-write permissions are not granted. It can also be excluded if desired via a constructor argument.

    Optionally enabled via BaseCLIFeatureOptions:

    keyReader is optional. If omitted, or if the stderr Terminal is not a TTY, prompting is unavailable: PrompterServiceProvider (and ArgumentPrompterServiceProvider, if enabled) are simply not registered. If promptingEnabled is true in that situation, run throws rather than failing later inside a prompt. Similarly ImagePrinterServiceProvider is only registered if the stdout Terminal is a TTY.

    By default the following commands are added:

    Hierarchy (View Summary)

    Implements

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

      Returns void

    • Run the CLI with the provided arguments which do not include the invoked executable name.

      Parameters

      • args: readonly string[]

        the arguments to parse.

      Returns Promise<RunResult>

      result of parsing arguments and running appropriate Command instances.