cliox

## Installation

npm install cliox
20 downloads in the last month

Cliox

Installation

npm install cliox

Usage

'use strict';

var http = require('http');
var path = require('path');
var cliox = require('../lib/cliox');
var app = cliox();

var cli = {
  test: function (app, done) {
    app.log('info', 'info info info');
    console.log('test');
    done();
  }
};

process.title = 'example';

app
  .version('0.0.0')
  .verbose([/* alias */]) // or .silent() or .quiet()
  .format(['json', 'xml', 'yml'])
  .help(path.join(__dirname, 'docs/cli'), 'help.%s.txt')
  .option('prot', {
    type: Number,
    alias: ['-p'],
    default: 3000
  })
  .option('host', {
    type: String,
    default: 'localhost'
  });

app.bind(cli);

app.noCommand(function (app, done) {
  app.getHelpMessage(function (err, data) {
    console.log(data);
    done();
  });
});

app.run(process.argv.slice(2), function () {
  //console.log('success !');
});
npm loves you