commandico
A small tool to write command line application that suits my needs
Last updated 6 years 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 (2 years ago)

11 Versions

  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           3 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 6
This Month 36
Last Day 3
Last Week 6
Last Month 45
Dependencies (4)
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |