n-cli

a usefull toolset for node commandline applications
Installation
$ npm install --save n-cli
Usage
#!/usr/bin/env node
"use strict";
var cli = new require("CLI")({
silent: false,
appname: "node-cli-example-app-1",
handleUncaughtException : true
});
cli.on("unicorn", function(){
this.argv.notNull("rainbow");
this.log(this);
});
$ your-client-app unicorn --rainbow forever;
{
prettyError:
PrettyError { },
init:
{ appname: 'node-cli-example-app-1',
handleUncaughtException: true },
argv: { _: [ 'unicorn' ], rainbow: 'e', notNull: [Function: bound ] },
config:
{ settings: {},
appFolder: 'c:\\git\\n-cli\\examples',
appPackageFilename: 'c:\\git\\n-cli\\examples\\package.json',
appPackage: {},
appName: 'node-cli-example-app-1',
dataFolder: 'C:\\Users\\User\\AppData\\Roaming\\node-cli-example-app-1',
filename: 'C:\\Users\\User\\AppData\\Roaming\\node-cli-example-app-1\\config.json' },
color:
Chalk { },
Error: [Function: NodeCliError],
minimist: [Function]
}
$ your-client-app unicorn --rainbow ;
License
MIT © s-a