3 ms·
I'm a big CLI user, but my primary gripe with these sorts of interfaces vs a GUI is when they have a huge number of nested sub commands. I often find myself sea
by macNchz 6y ago
I'm a big CLI user, but my primary gripe with these sorts of interfaces vs a GUI is when they have a huge number of nested sub commands. I often find myself searching through the tree of possibilities running --help on every single level just to do something simple. Especially if what I'm trying to do may exist in disparate sub commands. With a web interface there'd likely be some kind of nested menu or dropdowns that offer more of a sense of the overall arrangement at a glance.
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-disk
- zhengyi13 6y agoThe best CLI manpage I've ever seen address this was linux's `ip` command (of the iproute2 package/tool suite). It 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.
- oblio 6y agoThe best CLIs are interactive. Try a Cisco console. At any point they have a limited search space and you can just type "?" to get autocompletion for what you're doing. Everything is hierarchical and very discoverable. You can negate things with "no" to unset properties and such. Even zsh with various plugins or fish feel rather primitive in comparison.
- cjvirtucio 6y agoI typically write bash wrappers in situations like that. You could also write in a real programming language that shells out to the CLI tool if it gets too complicated.. even better if there's a library that does away with the need of shelling out.