-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Title:
Improve CLI UX: Show help text when sub-command is run without required arguments
Description:
Currently, when subcommands like edit are run without the required arguments, the CLI only displays a error like:
$ sbomasm edit
Error: accepts 1 arg(s), received 0To help user with the command structure, we should automatically provide the help messages.
Desired Proposal
Update CLI behavior to automatically show help text when:
- A subcommand is invoked without required arguments
-hor--helpis passed- No flags or args are provided after a subcommand
$ sbomasm edit
Error: requires at least 1 argument
Usage:
sbomasm edit [flags]
Flags:
-a, --append append to field instead of replacing
--author strings author to add e.g 'name (email)'
--copyright string copyright to add e.g 'Copyright © 2024'
--cpe string cpe to add e.g 'cpe:2.3:a:microsoft:internet_explorer:8.*:sp?:*:*:*:*:*:*'
--description string description to add e.g 'this is a cool app'
--hash strings checksum to add e.g 'MD5 (hash'
-h, --help help for edit
--license strings license to add e.g 'MIT'
--lifecycle strings lifecycle to add e.g 'build'
-m, --missing edit only missing fields
--name string name of the entity
-o, --output string path to edited sbom, defaults to stdout
--purl string purl to add e.g 'pkg:deb/debian/abc@1.0.0'
--repository string repository to add e.g 'github.com/interlynk-io/sbomasm'
--search string search string to find the entity
--subject string subject to edit (document, primary-component, component-name-version) (default "document")
--supplier string supplier to add e.g 'name (email)'
--timestamp add created-at timestamp
--tool strings tool to add e.g 'sbomasm (v1.0.0)'
--type string type to add e.g 'application'
--version string version of the entity
Global Flags:
-d, --debug debug output
Metadata
Metadata
Assignees
Labels
No labels