We know about Jarvis from Iron Man. He is very reliable indeed. Although, we can pleasantly want to own a Jarvis, we can start creating simple CLI that you can customize for your own simple needs, instead. With that, we can use oclif. oclif is a framework for building CLIs in Node. It is extensible and customizable and we can see its prowess in a short while.
To begin, let me show the priorities that we will be covering for this article —
In backend development, when we mention “CLI”, we could easily think of git
npx
etc., this time, I’d like to build and call my CLI dxc
. But you can change it with your own name preference as long as it conforms to npm naming guidelines. To start, let’s install oclif first and create our oclif framework
$ npm install -g oclif
$ oclif multi dxc
The last command will try to build the multi-command CLI and will prompt you with several questions about your CLI. Please see how I set it here —
**Note! **Change dxc
with your own CLI name preference.
#cli #oclif #javascript