Format click help output nicely with rich.
highlighter
--rich-config
and --output
options to the rich-click
CLI.rich_click.py
is exclusively the global config; all formatting has been moved to rich_help_rendering.py
.RichCommand
now makes use of methods in the super class: format_usage
, format_help_text
, format_options
, and format_epilog
.formatter
object has been removed from the code.highlighter
is now constructed by the RichHelpFormatter
rather than being inside the config object.RichHelpConfiguration.load_from_globals()
classmethod, which pulls all configuration from rich_click.py
.RichHelpConfiguration()
is now asserted to be JSON serializable, as an option for porting configurations. That said, serialization is not a fully supported feature of the high-level API, so serialize the config at your own risk.
highlighter
is now deprecated in RichHelpConfiguration
; please use highlighter_patterns
instead.pyproject.toml
and removed setup.py
/ setup.cfg
; thank you @Stealthii!text_markup: Literal["markdown", "rich", "ansi", None]
instead of booleans.
ansi
instead of None
to help support usage of click.style()
. None
is still supported.stderr
by default.STYLE_OPTIONS_PANEL_BOX
STYLE_COMMANDS_PANEL_BOX
STYLE_ERRORS_PANEL_BOX
command_path
and command.name
.*
) option for command groups and option groups, with thanks to @ITProKyle!TypedDict
[#156]panel_styles
support to groups. [#178]table_styles
and panel_styles
to be defined for the positional arguments group.Using __version__
instead of importlib
for the Click version check vastly improves performance.
ctx.command_path
and command.name
*
) option for command groups and option groups, with thanks to @ITProKyle!stderr
by default.rich_click.patch.patch()
behavior when running unpatched RichGroup
s.