{"id":13501337,"url":"https://github.com/ewels/rich-click","last_synced_at":"2025-05-13T21:11:09.800Z","repository":{"id":37534590,"uuid":"457527938","full_name":"ewels/rich-click","owner":"ewels","description":"Format click help output nicely with rich.","archived":false,"fork":false,"pushed_at":"2025-05-06T19:37:05.000Z","size":16659,"stargazers_count":669,"open_issues_count":24,"forks_count":40,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-06T20:02:26.541Z","etag":null,"topics":["cli","click","colored","coloured","help","python","rich","styled","styles"],"latest_commit_sha":null,"homepage":"https://ewels.github.io/rich-click/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ewels.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-09T21:04:35.000Z","updated_at":"2025-05-06T19:37:08.000Z","dependencies_parsed_at":"2023-09-24T22:18:38.796Z","dependency_job_id":"4c843440-74fe-4240-a390-e8c74cd38427","html_url":"https://github.com/ewels/rich-click","commit_stats":{"total_commits":267,"total_committers":26,"mean_commits":10.26923076923077,"dds":"0.45318352059925093","last_synced_commit":"8e7523c891e0d3132f3c49e98154945e371d5e9b"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Frich-click","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Frich-click/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Frich-click/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Frich-click/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewels","download_url":"https://codeload.github.com/ewels/rich-click/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253504381,"owners_count":21918790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","click","colored","coloured","help","python","rich","styled","styles"],"created_at":"2024-07-31T22:01:33.841Z","updated_at":"2025-05-13T21:11:04.770Z","avatar_url":"https://github.com/ewels.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/ewels/rich-click/main/docs/images/rich-click-logo-darkmode.png\"\u003e\n        \u003cimg alt=\"rich-click logo\" src=\"https://raw.githubusercontent.com/ewels/rich-click/main/docs/images/rich-click-logo.png\"\u003e\n    \u003c/picture\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eRichly rendered command line interfaces in click.\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/rich-click?logo=pypi\" alt=\"PyPI\"/\u003e\n    \u003cimg src=\"https://github.com/ewels/rich-click/workflows/Test%20Coverage/badge.svg\" alt=\"Test Coverage badge\"\u003e\n    \u003cimg src=\"https://github.com/ewels/rich-click/workflows/Lint%20code/badge.svg\" alt=\"Lint code badge\"\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://ewels.github.io/rich-click\"\u003eDocumentation\u003c/a\u003e\u0026nbsp\u0026nbsp·\u0026nbsp\u0026nbsp\u003ca href=\"https://github.com/ewels/rich-click\"\u003eSource Code\u003c/a\u003e\u0026nbsp\u0026nbsp·\u0026nbsp\u0026nbsp\u003ca href=\"https://github.com/ewels/rich-click\"\u003eChangelog\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n**rich-click** is a shim around [Click](https://click.palletsprojects.com/) that renders help output nicely using [Rich](https://github.com/Textualize/rich).\n\n- Click is a _\"Python package for creating beautiful command line interfaces\"_.\n- Rich is a _\"Python library for rich text and beautiful formatting in the terminal\"_.\n\nThe intention of `rich-click` is to provide attractive help output from\nClick, formatted with Rich, with minimal customization required.\n\n## Features\n\n- 🌈 Rich command-line formatting of click help and error messages\n- 😌 Same API as Click: usage is simply `import rich_click as click`\n- 💫 Nice styles by default\n- 💻 CLI tool to run on _other people's_ tools (prefix the command with `rich-click`)\n- 📦 Export help text as HTML or SVG\n- 🎁 Group commands and options into named panels\n- ❌ Well formatted error messages\n- 🔢 Easily give custom sort order for options and commands\n- 🎨 Extensive customization of styling and behaviour possible\n\n## Installation\n\n```shell\npip install rich-click\n```\n\n[Read the docs](https://ewels.github.io/rich-click#installation) for all supported installation methods.\n\n## Examples\n\n### Simple Example\n\nTo use rich-click in your code, replace `import click` with `import rich_click as click` in your existing click CLI:\n\n```python\nimport rich_click as click\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\ndef hello(count, name):\n    \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n    for _ in range(count):\n        click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n    hello()\n```\n\n![`python examples/11_hello.py --help`](docs/images/hello.svg)\n\n_Screenshot from [`examples/11_hello.py`](examples/11_hello.py)_\n\n### More complex example\n\n![`python examples/03_groups_sorting.py`](docs/images/command_groups.svg)\n\n_Screenshot from [`examples/03_groups_sorting.py`](examples/03_groups_sorting.py)_\n\n## Usage\n\nThis is a quick overview of how to use **rich-click**. [Read the docs](https://ewels.github.io/rich-click) for more information.\n\nThere are a couple of ways to begin using `rich-click`:\n\n### Import `rich_click` as `click`\n\nSwitch out your normal `click` import with `rich_click`, using the same namespace:\n\n```python\nimport rich_click as click\n```\n\nThat's it! ✨ Then continue to use Click as you would normally.\n\n\u003e See [`examples/01_simple.py`](https://github.com/ewels/rich-click/blob/main/examples/01_simple.py) for an example.\n\n### Declarative\n\nIf you prefer, you can use `RichGroup` or `RichCommand` with the `cls` argument in your click usage instead.\nThis means that you can continue to use the unmodified `click` package in parallel.\n\n```python\nimport click\nfrom rich_click import RichCommand\n\n@click.command(cls=RichCommand)\ndef main():\n    \"\"\"My amazing tool does all the things.\"\"\"\n```\n\n\u003e See [`examples/02_declarative.py`](https://github.com/ewels/rich-click/blob/main/examples/02_declarative.py) for an example.\n\n### `rich-click` CLI tool\n\n**rich-click** comes with a CLI tool that allows you to format the Click help output from _any_ package that uses Click.\n\nTo use, prefix `rich-click` to your normal command.\nFor example, to get richified Click help text from a package called `awesometool`, you could run:\n\n```console\n$ rich-click awesometool --help\n\nUsage: awesometool [OPTIONS]\n..more richified output below..\n```\n\n## License\n\nThis project is licensed under the MIT license.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewels%2Frich-click","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewels%2Frich-click","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewels%2Frich-click/lists"}