import yargs from 'yargs'; import type { Command } from './command'; import type { GroupsType } from './command-groups'; import type { OnCommandStartSlot } from './cli.main.runtime'; import type { CommandRunner } from './command-runner'; export declare class CLIParser { private commands; private groups; private onCommandStartSlot; parser: yargs.Argv<{}>; private yargsCommands; constructor(commands: Command[], groups: GroupsType, onCommandStartSlot: OnCommandStartSlot); parse(args?: string[]): Promise; private addYargsCommand; private setHelpMiddleware; private handleCommandFailure; private configureCompletion; private printHelp; private configureParser; private parseCommandWithSubCommands; private getYargsCommand; private configureGlobalFlags; private throwForNonExistsCommand; /** * manipulate the command help output. there is no API from Yarn to do any of this, so it needs to be done manually. * see https://github.com/yargs/yargs/issues/1956 * * the original order of the output: * description * Options * Commands * Global * Positionals * Examples */ private logCommandHelp; } export declare function findCommandByArgv(commands: Command[]): Command | undefined;