interface CommandSpec { name: string; description: string; } interface OptionSpec { flag: string; description: string; default?: string; } interface ExampleSpec { description: string; command: string; } interface HelpLabels { usage: string; commands: string; options: string; examples: string; } interface HelpSpec { name: string; description: string; usage: string; commandGroups?: { heading: string; commands: CommandSpec[]; }[]; commands?: CommandSpec[]; options?: OptionSpec[]; examples?: ExampleSpec[]; labels?: Partial; } declare function formatHelp(spec: HelpSpec): string; interface ErrorLabels { validValues: string; hint: string; } declare function formatError(message: string, opts?: { validValues?: string[]; hint?: string; labels?: Partial; }): string; declare function readStdinBufferSync(): Buffer; declare function readStdinSync(): string; /** Create an Error with a cliMessage property for structured CLI error handling */ declare function cliError(message: string): Error & { cliMessage?: string; }; export { formatHelp, formatError, readStdinSync, readStdinBufferSync, cliError, }; export type { HelpSpec, HelpLabels, CommandSpec, OptionSpec, ExampleSpec };