cyclops-ui / cyclops

Developer Friendly Kubernetes 👁️

Home Page:https://cyclops-ui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`cyctl`: Refactor command structure to Nest subcommands

siddhantprateek opened this issue · comments

Is your feature request related to a problem? Please describe.

Currently cyctl available commands are implemented using switch cases, which I believe is not ideal. I think the subcommands should be nested.

For example, running cyctl -h should display output like this:

$ cyctl -h
Cyclops gives you a UI containing fields you define yourself to manage your K8s workloads.

Usage:
  cyctl [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  delete      Delete custom resources like modules, templates, and templateauthrules
  get         Retrieve custom resources like modules, templates, and templateauthrules
  help        Help about any command
  version     Prints the version of cyctl

Flags:
  -h, --help      help for cyctl
  -v, --version   version for cyctl

Use "cyctl [command] --help" for more information about a command.

Then, running cyctl get -h should list modules, templates, and templateauthrules as available commands instead of passing them as arguments.


Will you be working on this issue ?
Yes