Project archetype for Command Line tools using Node.js
It provides only one simple command, that is: echo
, that echoes back it s only one parameter:
ncli-archetype echo -t Hi
Run the install command:
npm install -g ncli-archetype
Check if ncli-archetype is properly installed:
$ ncli-archetype --help
To learn more about the tool visit the homepage.
This project can be used to generate a new CLI project too, using the kickoff utility.
In order to generate a new CLI project, do the following:
- Install the kickoff utility, if you have not installed yet:
npm install -g kickoff
- Create a new CLI project:
kickoff -s tombenke/ncli-archetype -d new-cli-app
- Finish the configuration of the new project, test and build it:
cd new-cli-app
sh ./.kickoff.sh
npm install
npm run test
npm run build
- Check if it works properly:
node dist/app.js echo --text Hi
You should see something like this:
info: echo.execute => Hi
- Now the project is ready, so you can extend it, according to your needs.