soroban-cli
soroban-cli copied to clipboard
soroban-cli: move the top-level `--list` option to a `plugin` subcommand
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.
cc @willemneal Thoughts?
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.