/** * Styled help formatter for Commander.js * * Adds color and formatting to help text while respecting TTY detection * and NO_COLOR environment variable. Falls back to plain text in non-TTY * environments. * * Styling approach (conservative, per clig.dev recommendations): * - Bold: Section headers (Usage:, Options:, Commands:) * - Cyan: Command and subcommand names * - Yellow: Option flags (-h, --help) * - Dim: Metadata like defaults, choices, argument placeholders */ import { Help, Command } from "commander"; /** * Custom Help class that adds styling to Commander's help output. * Uses Commander's built-in style methods for consistent formatting. */ export declare class StyledHelp extends Help { /** * Style section titles like "Usage:", "Options:", "Commands:" */ styleTitle(title: string): string; /** * Style the usage string (the part after "Usage:") * e.g., "rd bookmarks list|ls [options] [collection-id]" */ styleUsage(str: string): string; /** * Style command name in usage string */ styleCommandText(str: string): string; /** * Style option flags like "-h, --help" or "--format " * The flag part is yellow, argument placeholders are dim. */ styleOptionText(str: string): string; /** * Style subcommand names in the command list */ styleSubcommandText(str: string): string; /** * Style argument placeholders like "" or "[collection-id]" */ styleArgumentText(str: string): string; /** * Style option descriptions, dimming metadata like (default:) and (choices:) */ styleOptionDescription(str: string): string; /** * Style subcommand descriptions, dimming metadata like (alias:) and (shortcut for:) */ styleSubcommandDescription(str: string): string; /** * Style argument descriptions */ styleArgumentDescription(str: string): string; /** * Format a list of items with a heading. * Adds a blank line after the heading for better readability. */ formatItemList(heading: string, items: string[], helper: Help): string[]; } /** * Configure a Command to use styled help output. * Must be called on each command (including subcommands) for styling to apply. * * The styling automatically respects: * - NO_COLOR environment variable * - --no-color flag * - TTY detection (no colors when piped) * - TERM=dumb */ export declare function configureStyledHelp(cmd: Command): void; /** * Recursively configure styled help on a command and all its subcommands. * Call this on your root program after all commands have been added. */ export declare function configureStyledHelpRecursive(program: Command): void; //# sourceMappingURL=help-formatter.d.ts.map