Skip to content

Instantly share code, notes, and snippets.

@DiamondI
Last active September 24, 2020 10:42
Show Gist options
  • Select an option

  • Save DiamondI/084022d84468367ca6abf897fc6adcf8 to your computer and use it in GitHub Desktop.

Select an option

Save DiamondI/084022d84468367ca6abf897fc6adcf8 to your computer and use it in GitHub Desktop.
[hello world for commander] #commander #terminal #introduction
console.log("hello, world!");
var program = require("commander");
program
.version('0.0.1')
.usage('[options] [value ...]')
.option("-s, --string <string>", "a string argument");
program.parse(process.argv);
console.log(program.string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment