soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

soroban-cli: move the top-level `--list` option to a `plugin` subcommand

Open leighmcculloch opened this issue 1 year ago • 2 comments

The soroban-cli has a top-level --list option that operates like a subcommand. It prints out a list of plugins:

$ soroban --help
...
      --list
          List installed plugins. E.g. `soroban-hello`
...

The name --list is particularly generic and it doesn't communicate intent on its own. It'd be clearer if we included the word plugins in a command about plugins.

Options in soroban-cli are intended for modifying selected functionality, rather than act as subcommands on their own.

And we may want to add other plugin related functionality in the future.

To address these concerns, I suggest we rename and move --list from being an option, to being a subcommand named plugins installed. The reason for selecting installed, is that it more specifically describes what the list will return. We could go with plugins list though too, or plugins ls to be consistent with other commands in the CLI like config networks ls.

leighmcculloch avatar Nov 25 '23 03:11 leighmcculloch

cc @willemneal Thoughts?

leighmcculloch avatar Nov 25 '23 03:11 leighmcculloch

I don't have a strong preference. I just borrowed what cargo does. But a plugin command could allow us to add a search of crates.io and show all available plugins.

willemneal avatar Nov 25 '23 16:11 willemneal