NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #925 most downloaded on PyPI
Rich help formatters for argparse and optparse
Last release 5 months ago
01 May 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
24 releases · first in 2022
One column per quarter.
Add ExtendedParagraphRichHelpFormatter by @hamdanal in #182
Full Changelog: v1.7.0...v1.8.0
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.7.0...v1.8.0
#171 Fix colors overlap on Py 3.14 Full Changelog : v1.7.1...v1.7.2
#171 Fix colors overlap on Py 3.14
Full Changelog: v1.7.1...v1.7.2
#162 Fix TypeError on nightly builds (Python 3.14.0a7+) due to new HelpFormatter arguments. The console parameter is now keyword-only. Full Changelog
#162 Fix TypeError on nightly builds (Python 3.14.0a7+) due to new HelpFormatter arguments. The console parameter is now keyword-only.
Full Changelog: v1.7.0...v1.7.1
This is the last release to support Python 3.8
This is the last release to support Python 3.8
auto-rich-argparse 🚀Improve the help output of your favorite argparse command line tool by simply installing auto-rich-argparse in its environment. Try it out with your favorite tool using:
uvx --with auto-rich-argparse <YOUR_FAVORITE_TOOL> --helpRead more at https://github.com/hamdanal/auto-rich-argparse.
In rich-argparse 2.0, rich markup will become opt in instead of opt out. This means usages like this:
parser.add_argument("--foo", help="[red]This text is in red[/]")Will need to set the option RichHelpFormatter.help_markup = True to work as expected. Please see #151 for context and to give feedback.
This release adds new features and fixes a few bugs.
rich_argparse.django module. Read more at https://github.com/hamdanal/rich-argparse#django-support. Contributed in #149ParagraphRichHelpFormatter, a formatter that preserves paragraph breaks, in the new rich_argparse.contrib module. Read more at https://github.com/hamdanal/rich-argparse#additional-formatters. Contributed in #147ValueError when using %(default)s inside square brackets and help_markup is enabled. Contributed in #153 and #154Full Changelog: v1.6.0...v1.7.0
This is the last release to support Python 3.8
auto-rich-argparse 🚀Improve the help output of your favorite argparse command line tool by simply installing auto-rich-argparse in its environment. Try it out with your favorite tool using:
uvx --with auto-rich-argparse <YOUR_FAVORITE_TOOL> --help
Read more at https://github.com/hamdanal/auto-rich-argparse.
In rich-argparse 2.0, rich markup will become opt in instead of opt out. This means usages like this:
parser.add_argument("--foo", help="[red]This text is in red[/]")
Will need to set the option RichHelpFormatter.help_markup = True to work as expected. Please see #151 for context and to give feedback.
This release adds new features and fixes a few bugs.
rich_argparse.django module. Read more at https://github.com/hamdanal/rich-argparse#django-support. Contributed in https://github.com/hamdanal/rich-argparse/pull/149ParagraphRichHelpFormatter, a formatter that preserves paragraph breaks, in the new rich_argparse.contrib module. Read more at https://github.com/hamdanal/rich-argparse#additional-formatters. Contributed in https://github.com/hamdanal/rich-argparse/pull/147ValueError when using %(default)s inside square brackets and help_markup is enabled. Contributed in https://github.com/hamdanal/rich-argparse/pull/153 and https://github.com/hamdanal/rich-argparse/pull/154Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.6.0...v1.7.0
rich_argparse.django module. Read more at
https://github.com/hamdanal/rich-argparse#django-supportParagraphRichHelpFormatter, a formatter that preserves paragraph breaks, in the new
rich_argparse.contrib module. Read more at
https://github.com/hamdanal/rich-argparse#additional-formattersImproved way to create metavars coloured strings by @atteggiani in #128
Full Changelog: v1.5.2...v1.6.0
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.5.2...v1.6.0
Fix a regression in version 1.5.1 in the handling of %(default)s style. The regression crashed the formatter in certain situations when %(default)s co
Fix a regression in version 1.5.1 in the handling of %(default)s style. The regression crashed the formatter in certain situations when %(default)s comes after a markup text.
Full Changelog: v1.5.1...v1.5.2
%(default)s style that was introduced in #123.Fix %(default)s style when help markup is deactivated by @hamdanal in #123
Full Changelog: v1.5.0...v1.5.1
%(default)s style when help markup is deactivated by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/123Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.5.0...v1.5.1
PR-103 Python 3.13 is now officially supported
help_markup and text_markup to disable console markup in the help text and the description text respectively.argparse.SUPPRESSFull Changelog: v1.4.0...v1.5.0
help_markup and text_markup to disable console markup in the help text and the description text respectively.argparse.SUPPRESSFull Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.4.0...v1.5.0
Add HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.
HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.RichHelpFormatter itself renderable with rich by @hamdanal in #90typing to improve startup time 35% by @hamdanal in #97%(default)s by @hamdanal in #98Full Changelog: v1.3.0...v1.4.0
HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.RichHelpFormatter itself renderable with rich by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/90typing to improve startup time 35% by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/97%(default)s by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/98Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.3.0...v1.4.0
RichHelpFormatter itself a rich renderable with rich console.RichHelpFormatter.HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.typing to improve startup time by about 35%.%(default)s in the help text.Experimental support for optparse now includes auto generation of usage string from options (similar to argparse). See https://github.com/hamdanal/ric
strip_control_codes from rich by @hamdanal in #75Full Changelog: v1.2.0...v1.3.0
strip_control_codes from rich by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/75Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.2.0...v1.3.0
optparse.GENERATE_USAGE to auto generate a usage similar to argparse.rich_format_* methods to optparse formatters. These return a rich.text.Text object.Experimental support for optparse help formatters. See https://github.com/hamdanal/rich-argparse#optparse-support for more.
Experimental support for optparse help formatters. See https://github.com/hamdanal/rich-argparse#optparse-support for more.
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.1.1...v1.2.0
optparse. Import optparse formatters from rich_argparse.optparse.ruff for linting and import sorting.rich_argparse is now a package instead of a module. This should not affect users.Add test for format specifier compatibility by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/65
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.1.0...v1.1.1
New style argparse.prog for the program name placeholder %(prog)s in the usage.
New style argparse.prog for the program name placeholder %(prog)s in the usage.
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v1.0.0...v1.1.0
Fix crash when formatting action params with non str conversion by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/50
First stable release
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.7.0...v1.0.0
Last release in the *Beta* stability policy.
Last release in the Beta stability policy.
str.title by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/48
This renders better with long group names and follows the convention of popular CLI tools and programs.
Note If you test the output of your CLI verbatim and rely on the default behavior of rich_argparse, you will have to either set
group_name_formatterexplicitly or update the group names in the tests to Title Case.
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.6.0...v0.7.0
group_name_formatter has changed from str.upper to str.title. This renders
better with long group names and follows the convention of popular CLI tools and programs.
Please note that if you test the output of your CLI verbatim and rely on the default behavior
of rich_argparse, you will have to either set the formatter explicitly or update the tests.Support type checking for users. Bundle type information in the wheel and sdist.
Auto-generated release notes:
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.5.0...v0.6.0
Add pre-commit.ci by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/32
Note This feature is not activated by default. To enable it, set
RichHelpFormatter.usage_markup = True. This only concerns the custom usage message passed toArgumentParser, the usage generated by argparse automatically will always be colored.
See https://github.com/hamdanal/rich-argparse/blob/main/CHANGELOG.md
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.4.0...v0.5.0
usage messages. Note that this feature is not activated by
default. To enable it, set RichHelpFormatter.usage_markup = True.Added support for all help formatters of argparse by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/31 There are now five formatter class
Added support for all help formatters of argparse by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/31
There are now five formatter classes defined in rich_argparse
RichHelpFormatter: the equivalent of argparse.HelpFormatter
RawDescriptionRichHelpFormatter: the equivalent of argparse.RawDescriptionHelpFormatter
RawTextRichHelpFormatter: the equivalent of argparse.RawTextHelpFormatter
ArgumentDefaultsRichHelpFormatter: the equivalent of argparse.ArgumentDefaultsHelpFormatter
MetavarTypeRichHelpFormatter: the equivalent of argparse.MetavarTypeHelpFormatter
Warning This changes the default behavior of
RichHelpFormatterto no longer respect line breaks in the description and help text. It now behaves similarly to the originalargparse.HelpFormatter. You have now to use the appropriate formatter subclass to control line breaks as you would do with argparse formatters.
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.3.1...v0.4.0
rich_argparse:RichHelpFormatter: the equivalent of argparse.HelpFormatter
RawDescriptionRichHelpFormatter: the equivalent of argparse.RawDescriptionHelpFormatter
RawTextRichHelpFormatter: the equivalent of argparse.RawTextHelpFormatter
ArgumentDefaultsRichHelpFormatter: the equivalent of argparse.ArgumentDefaultsHelpFormatter
MetavarTypeRichHelpFormatter: the equivalent of argparse.MetavarTypeHelpFormatter
Note that this changes the default behavior of RichHelpFormatter to no longer respect line
breaks in the description and help text. It now behaves similarly to the original
HelpFormatter. You have now to use the appropriate subclass for this to happen.Add a contributing guideline by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/29
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.3.0...v0.3.1
A new custom usage lexer that is consistent with the formatter styles
max_help_position is now set to 24 (the default used in argparse) as line breaks
are no longer an issue
RichHelpFormatter.renderables property has been removed, it was never documented
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.2.1...v0.3.0
max_help_position is now set to 24 (the default used in argparse) as line breaks
are no longer an issueRichHelpFormatter.renderables property has been removed, it was never documentedFix integration with argparse.ArgumentDefaultsHelpFormatter by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/14
argparse.ArgumentDefaultsHelpFormatter by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/14Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.2.0...v0.2.1
Metavars now have their own style argparse.metavar which defaults to 'bold cyan'
argparse.metavar which defaults to 'bold cyan'
: after the group name similar to the original HelpFormatter
% such as %(prog)s and %(default)s
Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.1.1...v0.2.0
Fix %(prog)s not replaced in text by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/6
%(prog)s not replaced in text by @hamdanal in https://github.com/hamdanal/rich-argparse/pull/6Full Changelog: https://github.com/hamdanal/rich-argparse/compare/v0.1.0...v0.1.1
First release. Now can install with pip install rich-argparse.
First release. Now can install with pip install rich-argparse.
Initial release
pip install rich-argparse now supportedYour coding agent can read these notes before it upgrades. Set up the MCP server →