Chapter 11. Writing command-line applications

This chapter covers

  • Designing command-line applications by using common conventions
  • Communicating with pipes
  • Using exit codes

Node command-line utilities are used everywhere, from project automation tools, such as Gulp and Yeoman, to XML and JSON parsers. If you’ve ever wondered how to build command-line tools with Node, this chapter will show you everything you need to know to get started. You’ll learn how Node programs accept command-line arguments and how to handle I/O with pipes. We’ve also included shell tips that will help you use the command line more effectively.

Although writing command-line tools with Node isn’t hard, it’s important to follow community conventions. This ...

Get Node.js in Action, Second Edition 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.