Skip to content
Parse command-line arguments into your NodeJS applications.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Parse command-line into your NodeJS applications.

node-comline - is a small command-line parser for your NodeJS application.


npm install node-comline

Bit more detail

Parses your command-line arguments and returns an object with them all in.


var com = require('node-comline');

// The module provides a single function to interact with, that simply returns
// all arguments parsed when the application was run

// By default, "-" and "--" are removed from the begining of
// the arguements provided; so "--that=argument" will return
// {"that":"argument"}

var config = {"removesingles":false, "removedoubles":false};
// Do this to turn that off

//The core function, set to "com()" in this case...
// Will directly return an object of arugment and value pairs

// So...

// Will return an [object], without any configuration

// Whereas...

// Will return an [object], and take into account the above created configuration


Creative Commons Licence
NodeOpt by Darren Looby is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at

Something went wrong with that request. Please try again.