import { Command as BaseCommand, Help as BaseHelp, Option } from 'commander';
export declare function toArray(value: string | string[], previous: string | string[]): string[];
export type OptionInfo = {
    flags: string;
    desc: string;
    env?: string;
    default?: any;
    defaultInfo?: any;
    required?: boolean;
    choices?: string[];
    variadic?: boolean;
    hidden?: boolean;
    deprecated?: string;
    parser?: (value: string, previous: any) => any;
};
export declare function cmd(command: Command): string;
export declare function args(command: Command | null): string[];
export declare const scope: (scopeName: string) => (config: Hash) => Hash<any>;
export declare const strictScope: (scopeName: string) => (config: Hash) => Hash<any>;
export declare const defined: (option: string, ...scopes: Hash[]) => any;
export declare const valuable: (...values: any[]) => boolean;
export declare const toggleable: <C extends Hash<unknown>>(field: string, args: Hash<unknown>, config: C) => C & {
    enabled: boolean;
};
declare const OptionSource: unique symbol;
export type ExtendedOption = Option & {
    defaultInfo?: string;
    [OptionSource]: OptionInfo;
};
export declare function option(o: OptionInfo): ExtendedOption;
export declare const configPath: unique symbol;
type ConfigUtils = {
    [configPath]: AbsolutePath | null;
    resolve(subpath: string): AbsolutePath;
};
export type Config<T> = T & ConfigUtils;
export declare function withConfigUtils<T extends Hash = Hash>(path: string | null, config: T): Config<T>;
export declare function resolveConfig<T extends Hash = {}>(path: AbsolutePath, { defaults, fallback, filter, }?: {
    filter?: (data: Hash) => T;
    defaults?: T;
    fallback?: T | null;
}): Promise<Config<T>>;
export declare class Help extends BaseHelp {
    showGlobalOptions: boolean;
    visibleOptions(command: Command): Option[];
    visibleGlobalOptions(command: Command): Option[];
    commandUsage(command: Command): string;
    commandDescription(command: Command): string;
    optionDescription(option: ExtendedOption): string;
    wrap(str: string, width: number, indent: number, minColumnWidth?: number): string;
}
export declare class Command extends BaseCommand {
    parent: Command | null;
    _helpLongFlag: string;
    _helpShortFlag: string;
    _helpDescription: string;
    _helpCommandDescription: string;
    missingMandatoryOptionValue(option: ExtendedOption): void;
    error(error: string): never;
    addOption(o: Option | ExtendedOption): this;
    createHelp(): Help;
}
export {};
