Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make arguments and flags of cli applications consistent #877

Closed
Tracked by #933
banjoh opened this issue Nov 30, 2022 · 1 comment
Closed
Tracked by #933

Make arguments and flags of cli applications consistent #877

banjoh opened this issue Nov 30, 2022 · 1 comment

Comments

@banjoh
Copy link
Member

banjoh commented Nov 30, 2022

Describe the rationale for the suggested feature.

Arguments and flags of support-bundle and analyze CLI applications are slightly inconsistent. This can lead to users getting confused.

All commands follow a <cmd> <args> <flags> format as below

[evans] $<cmd> -h
Short description of what the command does

Usage:
  <cmd> [url] [flags]
  <cmd> [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  version     Print the current version and exit

Flags:
<bunch of flags>

support-bundle and analyze have some options that are misleading/confusing

  • support-bundle
    There is a analyze command which does the same thing as analyze CLI.
Usage:
  support-bundle [url] [flags]
  support-bundle [command]

Available Commands:
  analyze     analyze a support bundle
  ...

Flags:
...
  • analyze
    analyze CLI is missing Available Commands: that the rest have. There is also an additional --analyzers flag that does the same thing as the [url] argument.
Usage:
  analyze [url] [flags]

Flags:
      --analyzers string               filename or url of the analyzers to use

Describe the feature

  • support-bundle
    • We can choose to either remove the analyze sub-command and leave the analyze CLI or do the opposite. This opens a discussion of whether we want to consolidate all support bundle operations (analyze, redact, collect) as sub-commands in the support-bundle CLI.
  • analyze
    • Remove --analyzers flag in favour of [urls]
    • Add additional sub-commands (completion, help, version)

Describe alternatives you've considered
Leave things as they are

Additional note
Should we deprecate the collect CLI application? support-bundle runs collectors as well in addition to redacting and analysing.

@banjoh banjoh changed the title Make arguments and options of cli applications consistent Make arguments and flags of cli applications consistent Dec 1, 2022
@banjoh banjoh changed the title Make arguments and flags of cli applications consistent Make arguments and flags of cli applications consistent and handle cli argument parsing errors better Dec 1, 2022
@banjoh banjoh changed the title Make arguments and flags of cli applications consistent and handle cli argument parsing errors better Make arguments and flags of cli applications consistent Dec 1, 2022
@xavpaice
Copy link
Member

I think to maintain compatibility with folks currently using these CLIs, I'd like to roll this into a task to create a consolidated command line for the Troubleshoot project (#933 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants