interface NcaCommand {
    command?: string;
    commandType?: CommandType;
    completion?: Completion;
    description?: string;
    directory: string;
    name: string;
    options?: OptionParam[];
    positionalArguments?: PositionalArgument[];
    positionalArgumentsAsOptions: boolean;
    runInConfigDirectory: boolean;
    subCommands?: NcaCommand[];
}

Properties

command?: string

The command to run when the nca command is called. Its execution mode will depend on a shell command on NcaCommand.commandType value. It can be left empty when NcaCommand.subCommands are defined.

commandType?: CommandType

Determines how the command will be executed. When left empty defaults to CommandType.Native.

completion?: Completion

Defines a custom completion for this nca command.

description?: string

The nca command description. It is showed when using the help command or when providing wrong/unrecognized input.

directory: string

Set internally. Allows commands and completionPaths to be used with relative paths.

name: string

The name that will be used to recall the command.

options?: OptionParam[]

Options passed down to this nca command and its subCommands.

positionalArguments?: PositionalArgument[]

Positional arguments passed down to this nca command and its sub commands.

positionalArgumentsAsOptions: boolean

Considered only when NcaCommand.commandType value is CommandType.Native. When set to true, the program will receive the positional arguments like options (i.e. --myParam myParamValue).

runInConfigDirectory: boolean

When set to true, the command execution directory will be changed to the one where its yaml configuration is located.

subCommands?: NcaCommand[]

Sub commands, used to define a more complex command structure.