Building for Humans versus Machines
Thinking about your end user while you develop your command-line application will make you a more empathic developer. Consider not just how you feel about the way certain command-line interfaces (CLIs) behave but also how you could improve the experience for yourself and others. Much goes into usability and it’s not possible to cram it all into a single chapter, so we suggest following up with the suggested article and book in the Further reading section.
One of the first points to consider when building your command-line interface is that while it will be primarily used by humans, it can also be called within scripts, and the output from your program could be used as input into another application, such as grep or awk. Within this chapter, we’ll go over how to build for both and how to tell when you’re outputting to one versus the other.
The second point is the use of ASCII art to increase information density. Whether...