commandico
A small tool to write command line application that suits my needs
Last updated a year ago by leichtgewicht .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install commandico 
SYNC missed versions from official npm registry.

Commandico

Build Status js-standard-style

A tiny - nodejs - command line tool that allows to cleanly create a command-line client.

Usage

add commandico to your package.json:

npm i commandico --save

then instantiate commadico:

var commandico = require('commandico')
  , defaultCommand = 'help'
  , scope = {
    number: 2
  };

var app = commandico(scope, defaultCommand)

then give it some commands

app.addCommands([{
    aliases: ['help'],
    handler: function (scope) {
        console.log(scope.number);
    }
}])

And further execute the script with some arguments

app.execute(['hello world'])

Current Tags

  • 2.0.4                                ...           latest (a year ago)

11 Versions

  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 7
This Month 38
Last Day 7
Last Week 10
Last Month 57
Dependencies (3)
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |