node-cli provide various features in order to deal with argument collections such as process.argv

npm install node-cli
1 downloads in the last day
9 downloads in the last week
34 downloads in the last month


node-cli is a small node module. I build it in order to easily handle node command line arguments.


install node-cli by using npm.

npm install node-cli

or with option -g (global) in order to make it available globally

npm install node-cli -g

load the module within your node script by using require.

var cli = require("node-cli");


The entire node-cli configuration is handeld by the init([optionl]args, [optional]delimiter) method. By default, node's system arguments are passed to node-cli (process.argv). The default delimiter is '='.


  • hasArguments(includeSystemArguments)
  • containsArgument(argument)
  • getArguments()
  • getArgumentAt(index)
  • getArgumentValueAt(index)
  • getArgument(key)
  • getArgumentAt(key)
  • getCount()
  • require(requiredArguments, onSuccess, onError)


.... read my post at


node-cli has been written using TDD, in order to execute the tests, you need to install mocha. You can easily install mocha by using npm. npm install mocha

By using mocha -R spec tests/* you can run all existing tests.

npm loves you