Approach to create CLI application

CLI is part of everyday life for a developer. You almost always find yourself using some sort of Command line. Let us discuss How you can create one CLI app for easing your workflow.

We will discuss the high level approach and some tools that are useful.

  1. Parse arguments – yargs
  2. Create commands – commander
  3. Show spinner – ora
  4. Show prompts and parse the input answer – inquirer
  5. Add colors to output – chalk, colors,
  6. Store key pair data – configstore
  7. Show beautiful ascii art – figlet
  8. Issue operating system commands – shelljs
  9. Make API calls – node-fetch

These tools are more than sufficient in building a professional CLI, experiment and read the documentation of these libraries to get the maximum output.

Published by Shailendra Ahir

Programmer, Author

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: