Skip to content

rich_click.cli

The command line interface.

Attributes

NameDescription
DISABLE_WARNINGS_NOTENo description.

Functions

NameDescription
list_themesPrint all themes.
mainThe [link=https://github.com/ewels/rich-click]rich-click[/] CLI provides
patchNo description.

DISABLE_WARNINGS_NOTEattributemodule attribute#

DISABLE_WARNINGS_NOTE = '[red]You can pass [b]--suppress-warnings[/b] to the rich-click CLI or set the [b]RICH_CLICK_CLI_SUPPRESS_WARNINGS[/b] environment variable to disable this message.[/red]'

list_themesfunction#

def list_themes(ctx: RichContext, param: click.Parameter, value: bool) -> None

Print all themes.

mainfunction#

def main(ctx: RichContext, script_and_args: tuple[str, ...], theme: str, output: Literal[None, 'html', 'svg'], errors_in_output_format: bool, suppress_warnings: bool, patch_rich_click: bool, rich_config: dict[str, Any] | None, show_help: bool) -> None

The [link=https://github.com/ewels/rich-click]rich-click[/] CLI provides [#FF6B6B bold]r[/][#FF8E53 bold]i[/][#FFB347 bold]c[/][#4ECDC4 bold]h[/][#45B7D1 bold]l[/][#74B9FF bold]y[/] formatted help output from any tool using [link=https://click.palletsprojects.com/]click[/], formatted with [link=https://github.com/Textualize/rich]rich[/].

Full docs here: [link=https://ewels.github.io/rich-click/latest/documentation/rich_click_cli/]https://ewels.github.io/rich-click/latest/documentation/rich_click_cli/[/]

The rich-click command line tool can be prepended before any Python package using native click to provide attractive richified click help output.

For example, if you have a package called [argument]my_package[/] that uses click, you can run:

[command]rich-click[/] [argument]my_package[/] [option]–help[/]

When not rendering help text, the provided command will run normally, so it is safe to replace calls to the tool with [command]rich-click[/] in front, e.g.:

[command]rich-click[/] [argument]my_package[/] [argument]cmd[/] [option]–foo[/] 3

patchfunction#

def patch(*args: Any, **kwargs: Any) -> None