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.
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
--quietand--verbosethat 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:
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.