by macNchz · 6y ago · 0 comments
I'm always happy to have access to the CLI to be able to script things, but if it's the only interface to a service with many features it can be awfully cumbersome.
Sometimes with these deeply nested do-it-all CLIs I feel like I'm playing a text adventure trying to navigate a maze, constantly typing /look and /examine. Often these tools have so many sub commands that a man page is not helpful if it exists at all.
> cloud-tool --help
...
> cloud-tool instances --help
...
> cloud-tool instances attach-storage --help
...
> cloud-tool instances attach-storage disk --help
...
> cloud-tool storage --help
...
> cloud-tool disks --help
...
> cloud-tool disks provision --help
...
> cloud-tool disks provision --size 200gb --name new-disk
Your session has expired please log in again.
> cloud-tool --help
...
> cloud-tool auth --help
...
> cloud-tool auth login
...
> cloud-tool storage provision --size 200gb --name new-disk
...
> cloud-tool instances attach-storage --help
...
> cloud-tool instances attach-storage disk --name new-diskIt starts with a BNF grammar of the various subcommands and options.
Plug that into your shell's autocomplete, and you've got a fairly discoverable TUI, I think.
Even zsh with various plugins or fish feel rather primitive in comparison.