/**
 * CLI Argument Parser
 *
 * Parses command-line arguments into structured command and options.
 */
import type { ParsedCommandLine, CommandOption } from './types.js';
/**
 * Unescapes common shell escape sequences that shells may add.
 *
 * Shells like bash and zsh often escape exclamation marks (!) with backslashes
 * to disable history expansion. When running commands through nested shells or
 * through tools like Claude Code, multiple layers of escaping can occur,
 * resulting in sequences like \\! or even \\\\!
 *
 * This function removes those unnecessary escapes to provide the expected user input.
 *
 * @param value - The string value to unescape
 * @returns The unescaped string
 */
export declare function unescapeShellArtifacts(value: string): string;
/**
 * Parses command-line arguments
 *
 * @param argv - Raw arguments (typically process.argv.slice(2))
 * @param commandOptions - Optional command-specific option definitions
 * @param parserOptions - Parser options
 * @param parserOptions.strict - If false, unknown options are skipped instead of throwing (default: true)
 * @returns Parsed command line structure
 */
export declare function parseArgs(argv: string[], commandOptions?: CommandOption[], parserOptions?: {
    strict?: boolean;
}): ParsedCommandLine;
/**
 * Validates that required options are present
 */
export declare function validateRequiredOptions(commandOptions: Record<string, unknown>, definitions: CommandOption[]): void;
/**
 * Generates help text for global options
 */
export declare function getGlobalOptionsHelp(): string;
/**
 * Generates help text for command-specific options
 */
export declare function getCommandOptionsHelp(options: CommandOption[]): string;
//# sourceMappingURL=parser.d.ts.map