Being consistent across CLIs
Learning about command-line syntax, flags, and environment variables requires an upfront cost that pays off in the long run with efficiency if programs are consistent across the board. For example, terminal conventions are ingrained into our fingertips. Reusing these conventions by following preexisting patterns helps to make a CLI more intuitive and guessable. This is what makes users efficient.
There are times when preexisting patterns break usability. As mentioned earlier, a lot of Unix commands don’t return any output by default, which can cause confusion for people who are new to using the terminal or CLI. In this case, it’s fine to break the pattern for the benefit of increased usability.
There are specific topics to consider when maintaining consistency with the larger community of CLIs, but also within the application itself:
- Naming
- Positional versus flag arguments
- Flag naming
- Usage
Naming
Use consistent...