Chapter 2Interacting with Your Users
Unlike with a graphical program, the user of a CLI tool generally provides up front all the input and parameters required for the tool to work. The tool uses that input to do its job and provides results back to the user as text output on the screen. When an error occurs, a CLI tool usually provides details about it in a way that’s easy and practical for the user to understand or potentially filter out.
In this chapter, you’ll get comfortable working with input and output as you build a command-line tool for managing a list of "to-do" items. This tool will let you keep track of items left in a project or activity. The tool will save the list of items in a file using the JSON format.
To implement this tool, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access