Skip to content

feature request: grouped flag categories in help output #97

Description

@tylerbutler

It can be helpful in some situations to group flags together into groups in the help output. For example, a CLI might have a set of global flags like --quiet and --verbose that apply to all commands. As flags are layered on from subcommands, it's easy to get lost in the sea of flags in the output.

Imagine something like this:

FLAGS:
    --allow=<STRING_LIST>   Allow licences, comma-separated
    --config=<STRING>       Read configuration from PATH
    --deny=<STRING_LIST>    Deny licences, comma-separated
    --ignore-config=<BOOL>  Ignore configuration files
    --manifest=<STRING>     Read manifest from PATH

CACHE FLAGS:
    --cache-path=<STRING>   Override the licence metadata cache file location
    --no-cache=<BOOL>       Bypass the on-disk licence metadata cache

GLOBAL FLAGS:
    --color=<STRING>        Colorize output: auto|always|never (default auto)
    --help                  Print help information
    --quiet=<BOOL>          Suppress progress output
    --verbose=<BOOL>        Show detailed progress output

My suggestion is to add the concept of a group that potentially only applies to the help output. I'm not sure how it would work exactly, but if you're open to the feature I could explore in a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions