5 ms·
Most projects design CLIs wrong, CLIs should be interactive by default to maximize discovery, everything from the command selection, to option selection, to spe
by seveibar 3y ago
Most projects design CLIs wrong, CLIs should be interactive by default to maximize discovery, everything from the command selection, to option selection, to specific parameter enum or even searchable resource ids. A -y flag should force it to be non-interactive. This is what I did with seam-cli and the usage of command line tools over eg postman for interacting with our API exploded- a good interactive CLI is all you need. It helps to use a well-defined schema, or for an API company an OpenAPI schema, to keep the CLI up to date and to maximize it’s capabilities.
- WhyNotHugo 3y agoWhat you are describing is a TUI, not a CLI.
- latexr 3y ago“Most” would be an awful experience. You wouldn’t be able to pipe anything in a terminal or write a script without polluting everything with a bunch of `-y` all over the place.
- gavinhoward 3y agoI agree with you, but there is something to what GP is saying. I use a multicall binary to implement a TUI; they are the same program, but one opens interactive, and the other is a regular CLI.
- qwery 3y agoBut you must agree it is almost certainly the case that most people design standards wrong.