--- title: Commander.js category: JavaScript libraries --- ### About {: .-intro} - ### Initialize var cli = require('commander'); ### Options cli .version(require('../package').version) .usage('[options] ') .option('-w, --words ', 'generate words') .option('-i, --interval ', 'interval [1000]', 1000) .option('-s, --symbols', 'include symbols') .parse(process.argv); ### Help .on('--help', function() { console.log(''); }) ### Commands cli.outputHelp(); cli.args == ["hello"]; ### Other useful things process.exit(0);