Skip to content

Ability to control ordering/grouping of commands in help text #149

@vito

Description

@vito

My CLI has a few commands that I'd like to call out for easier discoverability, e.g. login should be listed first. Currently commands are ordered alphabetically, which is a sane default especially when the AddCommand flow is used (since the order is not well-defined with func init()).

Some way to influence the ordering, or even better, having a way to group commands together (similar to option groups) would be nice. For example, in large CLIs you'll often have a set of commands relevant to a particular object type.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions