huggingface_hub
04195e04 - [CLI] Pretty-print `--help` with ANSI styling (#4192)

Commit
194 days ago
[CLI] Pretty-print `--help` with ANSI styling (#4192) * [CLI] Pretty-print --help output with ANSI styling Add a StyledHelpFormatter that applies ANSI formatting to CLI help: - Bold section headings (Options:, Commands:, etc.) - Yellow 'Usage:' prefix with bold program name - Cyan command/option names in definition lists - Dim example lines ($ hf ...) - Bold epilog headings (Examples, Learn more) ANSI codes are only emitted when stdout is a TTY, the process is not driven by an AI agent, and NO_COLOR is not set. Co-authored-by: Lucain <Wauplin@users.noreply.github.com> * [CLI] Use existing ANSI helper and remove cyan color - Replace raw ANSI escape codes with the existing ANSI utility class - Add ANSI.dim() to the shared helper - Remove cyan styling from definition list entries - Fix false-positive bolding of description text (only bold epilog headings at indent level 0) Co-authored-by: Lucain <Wauplin@users.noreply.github.com> * dim is grey * undo comment * underline * bter? * no ANSI for agents * useless comments * even better --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Lucain <Wauplin@users.noreply.github.com> Co-authored-by: célina <hanouticelina@gmail.com>
Author
Parents
Loading