Skip to content

Improve pip's CLI help using rich colors #12134

@hamdanal

Description

@hamdanal

What's the problem this feature will solve?

Reading the help of a large CLI like pip can sometimes be difficult because of the amount of information displayed on the screen. pip already improve on the default optparse help formatters by using a custom PrettyHelpFormatte. I think the help text can be made even more easier to read by using different colors for the section titles and for the command line arguments.

Describe the solution you'd like

With rich already vendored by pip, it is a fairly straight forward to improve the situation. I'd like to propose a PR adding this if there is no objection from the maintainers. I expect the change to be minimal since pip already does of the customization work already and the heavy lifting is done by rich.

Alternative Solutions

Do nothing, the current situation is good enough.

Additional context

I have a working optparse formatter with colors here https://github.com/hamdanal/rich-argparse/blob/main/rich_argparse/optparse.py. The change will be based on this formatter but modified per pip's custom requirements.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: cliCommand line interface related things (optparse, option grouping etc)type: feature requestRequest for a new feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions