hipcheck icon indicating copy to clipboard operation
hipcheck copied to clipboard

Make Hipcheck `-h` output split listed commands into groups

Open alilleybrinker opened this issue 1 year ago • 2 comments

Right now, the help text for Hipcheck just lists all commands together alphabetically, which isn't wrong but could be clearer.

Current

Automatically assess and score software repositories for supply chain risk

Usage: hc [OPTIONS] [COMMAND]

Commands:
  check   Analyze a package, source repository, SBOM, or pull request
  schema  Print the JSON schema for output of a specific `check` command
  setup   Initialize Hipcheck config file and script file locations
  ready   Check if Hipcheck is ready to run
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help (see more with '--help')
  -V, --version  Print version

Output Flags:
  -v, --verbosity <VERBOSITY>  How verbose to be [possible values: quiet, normal]
  -k, --color <COLOR>          When to use color [possible values: always, never, auto]
  -f, --format <FORMAT>        What format to use [possible values: json, human]

Path Flags:
  -c, --config <CONFIG>  Path to the configuration folder
  -d, --data <DATA>      Path to the data folder
  -C, --cache <CACHE>    Path to the cache folder

Imagined

Automatically assess and score software repositories for supply chain risk

Usage: hc [OPTIONS] [COMMAND]

Main Command:
  check   Analyze a package, source repository, SBOM, or pull request

Support Commands:
  schema  Print the JSON schema for output of a specific `check` command
  setup   Initialize Hipcheck config file and script file locations
  ready   Check if Hipcheck is ready to run
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help (see more with '--help')
  -V, --version  Print version

Output Flags:
  -v, --verbosity <VERBOSITY>  How verbose to be [possible values: quiet, normal]
  -k, --color <COLOR>          When to use color [possible values: always, never, auto]
  -f, --format <FORMAT>        What format to use [possible values: json, human]

Path Flags:
  -c, --config <CONFIG>  Path to the configuration folder
  -d, --data <DATA>      Path to the data folder
  -C, --cache <CACHE>    Path to the cache folder

alilleybrinker avatar Jul 01 '24 19:07 alilleybrinker

This SO post seems to suggest it can't be done

j-lanson avatar Jul 17 '24 11:07 j-lanson

Yeah I've seen that one. Our options then are either to try to work with the Clap folks to make that possible (long-term) and substitute our own help text for the top level help commands (short-term). We can discuss both, I think. Probably wouldn't want to pursue the Clap outreach until later, maybe the 3.7 milestone.

alilleybrinker avatar Jul 17 '24 17:07 alilleybrinker

Closing since it's not possible in Clap and not a priority for us.

alilleybrinker avatar Nov 29 '24 19:11 alilleybrinker