Building an Easy-to-Use Command-Suite Interface

Command suites are more complex by nature than a basic automation or single-purpose command-line app. Since command suites bundle a lot of functionality, it’s even more important that they be easy to use. Helping users navigate the commands and their options is crucial.

Let’s revisit our to-do list app we discussed in Chapter 1, Have a Clear and Concise Purpose. We’ve discussed that the command-suite pattern is the best approach, and we have already identified three commands the app will need: “new,” “list,” and “done” to create a new task, list the existing tasks, and complete a task, respectively.

We also want our app to provide a way to locate the to-do list file we’re operating on. A ...

Get Build Awesome Command-Line Applications in Ruby 2 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.