# hoagie

> Express-like organization for command-line applications

Latest version **3.4.1** (published 2017-03-23) · ISC license · 0 weekly downloads

## Install

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

## 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 | 3.4.1 |
| Published | 2017-03-23 |
| First published | 2014-08-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jeremy Ruppel |
| Maintainers | jeremyruppel |
| Keywords | cli, git, command, line, subcommand, argv, express, connect |

## Links

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

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [vmplate](https://npm.io/package/vmplate.md) ^1.1.1
- [minimist](https://npm.io/package/minimist.md) ^1.1.3
- [merge-descriptors](https://npm.io/package/merge-descriptors.md) ^1.0.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

- 3.4.1 (latest) — 2017-03-23
- 3.4.0 — 2016-04-14
- 3.3.0 — 2015-10-19
- 3.2.0 — 2015-10-19
- 3.1.0 — 2015-10-19
- 3.0.0 — 2015-10-17
- 2.4.0 — 2015-10-14
- 2.3.1 — 2015-09-15
- 2.3.0 — 2015-09-15
- 2.2.3 — 2015-09-15
- 2.2.2 — 2015-09-15
- 2.2.1 — 2015-09-15
- 2.2.0 — 2015-09-14
- 2.1.5 — 2015-09-14
- 2.1.4 — 2015-09-13
- … 10 more at https://npm.io/package/hoagie/versions

## README

# hoagie

[express][express]-like organization for command-line applications.

> [![NPM version][npm-badge]][npm]
> [![Build Status][travis-badge]][travis-ci]

## Install

``` bash
$ npm install hoagie --save
```

## Usage

``` js
// math.js

var hoagie = require('hoagie');

var app = hoagie();

app.use('add', function(req, res, next) {
	var a = parseInt(req.params[1], 10);
	var b = parseInt(req.params[2], 10);

	res.send(a + b);
});

app.run(hoagie.argv);
```

``` bash
$ node ./math.js add 1 1
2
```

See the `examples` directory for more code samples.

### app.use([command, ]fn...)

Adds each middleware function to the stack, optionally under the `command` space. Each middleware should be a function of the signature `function(req, res, next)`.

## Middleware

- [hoagie-session][hoagie-session] adds "session" support
- [hoagie-exec][hoagie-exec] Make your hoagie program exec to another process

## License

[ISC License][LICENSE]

[express]: https://github.com/strongloop/express
[npm]: http://badge.fury.io/js/hoagie
[npm-badge]: https://badge.fury.io/js/hoagie.svg
[travis-ci]: https://travis-ci.org/jeremyruppel/hoagie
[travis-badge]: https://travis-ci.org/jeremyruppel/hoagie.svg?branch=master
[LICENSE]: https://github.com/jeremyruppel/hoagie/blob/master/LICENSE
[hoagie-session]: https://github.com/jeremyruppel/hoagie-session
[hoagie-exec]: https://github.com/jeremyruppel/hoagie-exec

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