CLIABLE
Easily add options to your cli's
Installation
In your projects directory:
npm install --save cliable
Usage
In node.js:
#!/usr/bin/env node const args = ; args;args; var arguments = argsstartprocessargv 'A helpful text'; //do something with arguments
Cli usage
Users can pass in options using yourapp --port 3000
.
Accessing options in your code
if argumentsdomain // you can access arguments.domain console
Using help
arguments.help
is false
if everything is fine, else it's a string you can log to the console.
That's is!