© Robert Kowalski 2017

Robert Kowalski, The CLI Book, https://doi.org/10.1007/978-1-4842-3177-7_3

3. Making Our CLI More Accessible

Robert Kowalski

(1)Hamburg, Germany

In the preceding chapter, we built a solid base for our command-line tool. We loaded our first command, and the whole program is executable on the command line. We will now focus on usability and accessibility. We will look at how to improve error handling and provide our users with a guiding hand, even if the program crashes. With JSON support and shorthand, we’ll bring a smile to the faces of our power users. We’ll also create different formats for our documentation. Before our first production release, we’ll add a flexible system for managing configuration.

Error Handling

You already ...

Get The CLI Book: Writing Successful Command Line Interfaces with Node.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.