fermyon / spin

Spin is the open source developer tool for building and running serverless applications powered by WebAssembly.
https://developer.fermyon.com/spin
Apache License 2.0
5.18k stars 247 forks source link

`spin --tree` or `spin --list` providing a tree structure of available subcommands and flags in spin cli #2598

Open me-diru opened 3 months ago

me-diru commented 3 months ago

As we don't yet have auto-completion #1032, it would be better to give a simple top-level flag that outlines the entire Spin CLI for more straightforward navigation and shows how it connected.

itowlson commented 3 months ago

If anyone fancies tackling this, I'd suggest making it a flag on spin help rather than a top-level flag.

image

calebschoepp commented 3 months ago

I too would prefer it as a flag on spin help rather than adding another top level command.

I'm curious if Clap would support something like this out of the box or if we would need to write a lot of custom code to do something like that.

itowlson commented 3 months ago

@calebschoepp I'm not aware of any out-of-the-box clap feature for this. And assuming custom code is needed, it would be best done as a separate crate in the clap ecosystem, rather than in Spin itself...