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

    Interface SubCommand

    Interface for a sub-command.

    interface SubCommand {
        description?: string;
        disableGenericHelpDisplay?: boolean;
        enableConfiguration?: boolean;
        helpTopic?: string;
        name: string;
        options: readonly (Option | ComplexOption)[];
        positionals: readonly Positional[];
        usageExamples?: readonly UsageExample[];
        execute(context: Context, argumentValues: ArgumentValues): Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    description?: string

    Optional description of the command.

    disableGenericHelpDisplay?: boolean

    Optionally hide the command from generic help listings. The command remains registered and executable, and its own usage help (help <command>) is still shown if explicitly requested.

    enableConfiguration?: boolean

    Optionally enable support for populating argument values via configuration. If this is true then default argument values may be sourced using a configuration source provided by the CLI runtime.

    helpTopic?: string

    Optional grouping topic of the command for structuring of help output.

    name: string

    Name of the command.

    Must consist of alphanumeric non-whitespace ASCII or _ and - characters. Cannot start with -.

    options: readonly (Option | ComplexOption)[]

    Option or ComplexOption argument definitions for the sub-command.

    positionals: readonly Positional[]

    Positional argument definitions for the sub-command.

    usageExamples?: readonly UsageExample[]

    Optional usage examples for the command to support help output.

    • Execute the command.

      Parameters

      • context: Context

        the Context in which to execute the command.

      • argumentValues: ArgumentValues

        the argument values for the command. This may be empty if the command's Option and Positional instances are all optional and no argument values were provided.

      Returns Promise<void>