Open briancain opened 4 months ago
How would you imagine capturing required vs non required. I was planning on having flag groups live under the respective categories that exist today.
USAGE
hcp waypoint action-config create [Optional Flags]
DESCRIPTION
Create a new action configuration.
REQUIRED FLAGS
-d, --description
The description of the action configuration.
-n, --name
The name of the action configuration.
OPTIONAL FLAGS
-u, --url
The URL of the action configuration.
Flags for example Feature 1:
-x, --example-feature-1
My cool feature unrelated to the other thing.
-y, --example-feature-A
My cool feature unrelated to the other thing.
GLOBAL FLAGS
--format=FORMAT, --profile=NAME, --project=ID, --quiet
For more global flag details, run $ hcp --help
Thoughts?
In all honesty I'd probably do whatever mitchell/cli
or spf13/cobra
does since they are pretty established CLI tools 😅 Just based on what I've experienced, I think I'd expect to see a Required
string on the flag description, maybe after the flag definition.
-n, --name
The name of the action configuration. (Required, Defaults to "example")
You could also show required flags by auto-generating the usage and auto-including required flags
USAGE
hcp waypoint action-config create -name="your-action-name" [Optional Flags]
Currently, there's no way in this project to define group flags in a command where flags are related. For example, with
mitchell/cli
you could define groups of flags known as FlagSets so the help shows them together as related fields.With the current project, it groups all flags as equal under
FLAGS
. Any commands that take a lot of options will become pretty messy and hard to understand what is related to what without grouping flags.With flag sets, help becomes much more useful:
This CLI project should support FlagSets so that commands with lots of configurations can group flags together for easier understanding.