# commandico

> A small tool to write command line application that suits my needs

Latest version **2.0.4** (published 2019-07-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install commandico
pnpm add commandico
yarn add commandico
bun add commandico
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2019-07-16 |
| First published | 2015-04-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Martin Heidegger |
| Maintainers | leichtgewicht |
| Keywords | cli, extendable |

## Links

- npm: https://www.npmjs.com/package/commandico
- Repository: https://github.com/martinheidegger/commandico
- Issues: https://github.com/martinheidegger/commandico/issues
- npm.io page: https://npm.io/package/commandico

## Dependencies (3)

- [explicit](https://npm.io/package/explicit.md) ^0.1.1
- [minimist](https://npm.io/package/minimist.md) ^1.1.1
- [@hapi/joi](https://npm.io/package/@hapi/joi.md) ^15.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2019-07-16
- 2.0.3 — 2018-07-13
- 2.0.2 — 2016-01-31
- 2.0.1 — 2016-01-31
- 2.0.0 — 2015-11-03
- 1.1.2 — 2015-10-21
- 1.1.1 — 2015-10-21
- 1.1.0 — 2015-09-20
- 1.0.2 — 2015-04-19
- 1.0.1 — 2015-04-19
- 1.0.0 — 2015-04-19

## README

# Commandico

[![Build Status](https://travis-ci.org/martinheidegger/commandico.svg?branch=master)](https://travis-ci.org/martinheidegger/commandico)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

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:

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

var app = commandico(scope, defaultCommand)
```

then give it some commands

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

And further execute the script with some arguments

```JavaScript
app.execute(['hello world'])
```

---
_Source: https://npm.io/package/commandico · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
