clijs
v0.1.2
Published
Tower cli provides a standard interface for creating cli utilities.
Downloads
4
Readme
Tower cli
Tower cli provides a standard interface for creating cli utilities.
Installation
Npm:
npm install tower-cli
Getting Started
Require cli:
var cli = require('tower-cli');
Create a new cli:
var todo = cli('todo');
Add options to the cli:
todo
.option('--foobar')
.option('--dev');
Add a new command to the cli:
todo.command('create {name}', function(name) {
// Do something with `name`.
});
Run the cli:
todo.run(process.argv);
That will parse the arguments and run the appropriate command.
Testing
make test # which runs `mocha`
License
MIT