# commandy

> The programmatic solution for command-line interfaces, inspired by commander.js

Latest version **3.0.0** (published 2017-08-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2017-08-03 |
| First published | 2017-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Halasi Tamás |
| Maintainers | trustedtomato |

## Links

- npm: https://www.npmjs.com/package/commandy
- Repository: https://github.com/trustedtomato/commandy
- Homepage: https://github.com/trustedtomato/commandy#readme
- Issues: https://github.com/trustedtomato/commandy/issues
- npm.io page: https://npm.io/package/commandy

## Recent versions

- 3.0.0 (latest) — 2017-08-03
- 2.0.1 — 2017-06-11
- 2.0.0 — 2017-05-28
- 1.3.0 — 2017-04-18
- 1.2.0 — 2017-04-18
- 1.1.6 — 2017-04-18
- 1.1.5 — 2017-04-17
- 1.1.4 — 2017-04-17
- 1.1.3 — 2017-04-17
- 1.1.2 — 2017-04-16
- 1.1.1 — 2017-04-16
- 1.1.0 — 2017-04-16
- 1.0.2 — 2017-04-16
- 1.0.1 — 2017-04-16
- 1.0.0 — 2017-04-16
- … 1 more at https://npm.io/package/commandy/versions

## README

# commandy 
[![Build Status](https://travis-ci.org/trustedtomato/commandy.svg?branch=master)](https://travis-ci.org/trustedtomato/commandy)
[![dependencies Status](https://david-dm.org/trustedtomato/commandy/status.svg)](https://david-dm.org/trustedtomato/commandy)
[![devDependencies Status](https://david-dm.org/trustedtomato/commandy/dev-status.svg)](https://david-dm.org/trustedtomato/commandy?type=dev)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![npm Downloads](https://img.shields.io/npm/dm/commandy.svg)](https://www.npmjs.com/package/commandy)

If you want to create a command line app which is hard to make with minimist, but don't want the syntactic sugar overdose which commander.js gives, this package is for you.

## Demo
```javascript
const {Program} = require('../');

const checkoutProgram = new Program();

const orderProgram = new Program([
	['p', 'pepperoni'],
	['c', 'cheese'],
	['h', 'ham']
])

const pizzaProgram = new Program({
	checkout: checkoutProgram,
	order: orderProgram
});

const margaretaCheckout = pizzaProgram.parse(['checkout','margareta']);
console.log(margaretaCheckout.program === checkoutProgram);
// => true
console.log(margaretaCheckout.args)
// => [ 'margareta' ]

const order = pizzaProgram.parse(['order','-ch','hawaii','-c','--pepperoni=little'])
console.log(order.args);
// => [ 'hawaii' ]
console.log(order.options.cheese);
// => [ true, true ]
console.log(order.options.ham);
// => [ true ]
console.log(order.options.pepperoni);
// => [ 'little' ]
```

## Installation
```npm install commandy --save```

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