type FlagType = "string" | "bool" | "int" | "stringSlice";
type FlagValue = string | boolean | number | string[];
type FlagTarget = {
    obj: Record<string, unknown>;
    key: string;
};
declare class Flag {
    name: string;
    shorthand: string | null;
    usage: string;
    type: FlagType;
    defaultValue: FlagValue;
    value: FlagValue;
    target: FlagTarget | null;
    isSet: boolean;
    constructor(options: {
        name: string;
        shorthand?: string | null;
        usage: string;
        type: FlagType;
        defaultValue: FlagValue;
        target?: FlagTarget | null;
    });
    setValue(value: FlagValue): void;
    private apply;
}
export declare class FlagSet {
    #private;
    static merge(...sets: FlagSet[]): FlagSet;
    StringVar(target: Record<string, unknown>, key: string, name: string, value: string, usage: string): Flag;
    stringVar(target: Record<string, unknown>, key: string, name: string, value: string, usage: string): Flag;
    StringVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: string, usage: string): Flag;
    stringVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: string, usage: string): Flag;
    StringSliceVar(target: Record<string, unknown>, key: string, name: string, value: string[], usage: string): Flag;
    stringSliceVar(target: Record<string, unknown>, key: string, name: string, value: string[], usage: string): Flag;
    StringSliceVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: string[], usage: string): Flag;
    stringSliceVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: string[], usage: string): Flag;
    BoolVar(target: Record<string, unknown>, key: string, name: string, value: boolean, usage: string): Flag;
    boolVar(target: Record<string, unknown>, key: string, name: string, value: boolean, usage: string): Flag;
    BoolVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: boolean, usage: string): Flag;
    boolVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: boolean, usage: string): Flag;
    BoolP(name: string, shorthand: string, value: boolean, usage: string): Flag;
    boolP(name: string, shorthand: string, value: boolean, usage: string): Flag;
    IntVar(target: Record<string, unknown>, key: string, name: string, value: number, usage: string): Flag;
    intVar(target: Record<string, unknown>, key: string, name: string, value: number, usage: string): Flag;
    IntVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: number, usage: string): Flag;
    intVarP(target: Record<string, unknown>, key: string, name: string, shorthand: string, value: number, usage: string): Flag;
    Lookup(name: string): Flag | null;
    lookup(name: string): Flag | null;
    ShorthandLookup(short: string): Flag | null;
    shorthandLookup(short: string): Flag | null;
    Parse(args: string[], allowUnknown?: boolean): {
        args: string[];
        error: Error | null;
    };
    parse(args: string[], allowUnknown?: boolean): {
        args: string[];
        error: Error | null;
    };
    values(): Flag[];
    private addFlag;
}
export type CommandArgsValidator = (cmd: Command, args: string[]) => Error | null;
export type CommandRun = (cmd: Command, args: string[]) => void;
export type CommandRunE = (cmd: Command, args: string[]) => Error | null | Promise<Error | null>;
export declare class Command {
    #private;
    Use: string;
    Short: string;
    Long: string;
    Example: string;
    Version: string;
    SilenceUsage: boolean;
    ValidArgs: string[];
    Args: CommandArgsValidator | null;
    Run: CommandRun | null;
    RunE: CommandRunE | null;
    Hidden: boolean;
    FParseErrWhitelist: {
        UnknownFlags?: boolean;
    };
    CompletionOptions: {
        DisableDefaultCmd?: boolean;
    };
    constructor(values?: Partial<Command>);
    get use(): string;
    set use(value: string);
    get short(): string;
    set short(value: string);
    get long(): string;
    set long(value: string);
    get example(): string;
    set example(value: string);
    get version(): string;
    set version(value: string);
    get silenceUsage(): boolean;
    set silenceUsage(value: boolean);
    get validArgs(): string[];
    set validArgs(value: string[]);
    get args(): CommandArgsValidator | null;
    set args(value: CommandArgsValidator | null);
    get run(): CommandRun | null;
    set run(value: CommandRun | null);
    get runE(): CommandRunE | null;
    set runE(value: CommandRunE | null);
    get hidden(): boolean;
    set hidden(value: boolean);
    get fParseErrWhitelist(): {
        UnknownFlags?: boolean;
    };
    set fParseErrWhitelist(value: {
        UnknownFlags?: boolean;
    });
    get completionOptions(): {
        DisableDefaultCmd?: boolean;
    };
    set completionOptions(value: {
        DisableDefaultCmd?: boolean;
    });
    AddCommand(...cmds: Array<Command | undefined | null>): void;
    addCommand(...cmds: Array<Command | undefined | null>): void;
    RemoveCommand(...cmds: Array<Command | undefined | null>): void;
    removeCommand(...cmds: Array<Command | undefined | null>): void;
    PersistentFlags(): FlagSet;
    persistentFlags(): FlagSet;
    Flags(): FlagSet;
    flags(): FlagSet;
    ParseFlags(args: string[]): Error | null;
    parseFlags(args: string[]): Error | null;
    Find(args: string[]): [Command, string[], Error | null];
    find(args: string[]): [Command, string[], Error | null];
    Execute(args?: string[]): Promise<Error | null>;
    execute(args?: string[]): Promise<Error | null>;
    SetErr(writer: {
        write: (chunk: string) => void;
    }): void;
    setErr(writer: {
        write: (chunk: string) => void;
    }): void;
    SetOut(writer: {
        write: (chunk: string) => void;
    }): void;
    setOut(writer: {
        write: (chunk: string) => void;
    }): void;
    SetHelpCommand(cmd: Command): void;
    setHelpCommand(cmd: Command): void;
    name(): string;
    private inheritedFlags;
    private allowsUnknownFlags;
    private writeError;
    private writeOutput;
    private hasVisibleChildren;
    private shouldShowHelp;
    private shouldShowVersion;
    private printVersion;
    private printHelp;
}
export {};
