A library for easily creating observable CLI tasks with support for commands, arguments, and options.
Go to file
2016-09-04 17:32:31 +02:00
dist improve typings and docs 2016-09-04 17:32:12 +02:00
docs improve typings and docs 2016-09-04 17:32:12 +02:00
test improve intellisense 2016-08-26 09:21:42 +02:00
ts improve typings and docs 2016-09-04 17:32:12 +02:00
.gitignore update smartcli 2016-09-04 17:23:29 +02:00
.gitlab-ci.yml add page stage 2016-09-04 17:32:26 +02:00
.koding.yml Add new file 2016-08-28 23:00:00 +00:00
LICENSE Initial commit 2015-10-04 23:06:36 +02:00
npmts.json update dependencies 2016-05-23 04:09:06 +02:00
package.json 1.0.6 2016-09-04 17:32:31 +02:00
README.md improve typings and docs 2016-09-04 17:32:12 +02:00

smartcli

nodejs wrapper for CLI related tasks. TypeScript ready.

Availabililty

npm git git docs

Status for master

build status coverage report Dependency Status bitHound Dependencies bitHound Code TypeScript node

Install the package

npm install smartcli --save

Usage

this plugin tries to establish some logic in which CLI tools work.

take the following commandline input:

mytool function argument1 argument2 --option1 -o2 option2Value
  • 'mytool' obviously is the tool (like git)
  • function is the main thing the tool shall do (like commit)
  • argument1 and argument2 are arguments
  • option1 is a longform option you can add (like --message for message)
  • optionValue is the referenced option value (like a commit message)
import {Smartcli} from "smartcli"
mySmartcli = new Smartcli();
mySmartcli.standardTask()
  .then(argvArg => {
    // do something if program is called without an command
  });

mySmartcli.question