This is a series of libraries and utilities for building Command-line-interfaces aka CLI using Node.js and ecosystem around it. Similar utilities/helpers may be available for other languages but, these series is focused on JavaScript and its friends.
You can check all articles under CLI Build Tool
tag.
If you are building a CLI and spawn a process to execute some external task/action, you can use child_process
to create Synchronous Process or Asynchronous Process. This works pretty well in most cases but execa
offers more.
As advertised, this package improves child_process methods with:
It provides APIs in both variants , async (Promise) and sync.
execa
has a very easy to follow, simple to use API. Here is a code example:
const execa = require('execa');
(async () => {
const { stdout } = await execa('echo', ['execa: A better child process management']);
console.log(stdout);
//=> 'execa: A better child process management'
})();
You can check out official repo for all usage details.
Github Repo: execa