ConstDefine argument that accepts a string value
Optionaloptions: Partial<Omit<StringArgument<Type>, "type">>Configuration options for the string argument
Define argument that accepts a spread of values (variable number of arguments)
Spread arguments collect all remaining positional arguments into an array. Only one spread argument is allowed per command and it must be the last argument.
Optionaloptions: Partial<Omit<SpreadArgument<Type>, "type">>Configuration options for the spread argument
export class InstallCommand extends BaseCommand {
@args.string({ description: 'Package manager' })
declare manager: string
@args.spread({ description: 'Package names to install', required: false })
declare packages?: string[]
}
// Usage: node ace install npm lodash axios moment
// manager = 'npm', packages = ['lodash', 'axios', 'moment']
Namespace for defining arguments using decorators.
Arguments are positional parameters that commands accept from the CLI. They are parsed in the order they are defined and made available as properties on the command instance.