Skip to content

DRAFT: ✨ Show all provider subcommands#2266

Closed
arlimus wants to merge 2 commits intomainfrom
dom/cli-defaults
Closed

DRAFT: ✨ Show all provider subcommands#2266
arlimus wants to merge 2 commits intomainfrom
dom/cli-defaults

Conversation

@arlimus
Copy link
Copy Markdown
Member

@arlimus arlimus commented Oct 17, 2023

Usually we only show subcommands for providers that are installed.
This offers an alternative where we show all provider subcommands in the
help menu.

After #2265

eg:

> cnquery shell --help 
Allows the interactive exploration of MQL queries.

Usage:
  cnquery shell [flags]
  cnquery shell [command]

Available Commands:
  arista           Interactive shell with an Arista EOS device
  atlassian        Interactive shell with Atlassian
  aws              Interactive shell with an AWS account
  azure            Interactive shell with an Azure subscription
  container        Interactive shell with a running container or container image
  docker           Interactive shell with a running docker or docker image
  equinix          Interactive shell with an Equinix Metal organization
  filesystem       Interactive shell with a mounted file system target.
  gcp              Interactive shell with a Google Cloud project
  github           Interactive shell with a GitHub organization or repository
...

I still wonder if we should create a custom help for these provider
plugins that is shorter than the current list of defaults. They are
getting a bit out of hand...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Usually we only show subcommands for providers that are installed.
This offers an alternative where we show all provider subcommands in the
help menu.

eg:

```bash
~ $> cnquery shell --help                                                                                                                                  x1
Allows the interactive exploration of MQL queries.

Usage:
  cnquery shell [flags]
  cnquery shell [command]

Available Commands:
  arista           Interactive shell with an Arista EOS device
  atlassian        Interactive shell with Atlassian
  aws              Interactive shell with an AWS account
  azure            Interactive shell with an Azure subscription
  container        Interactive shell with a running container or container image
  docker           Interactive shell with a running docker or docker image
  equinix          Interactive shell with an Equinix Metal organization
  filesystem       Interactive shell with a mounted file system target.
  gcp              Interactive shell with a Google Cloud project
  github           Interactive shell with a GitHub organization or repository
...
```

I still wonder if we should create a custom help for these provider
plugins that is shorter than the current list of defaults. They are
getting a bit out of hand...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
@arlimus arlimus requested review from chris-rock and tas50 October 17, 2023 07:24
@chris-rock chris-rock marked this pull request as draft February 28, 2024 10:21
@arlimus arlimus closed this Dec 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant