# parse-help

> Parse CLI help output

Latest version **2.0.0** (published 2021-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-help
pnpm add parse-help
yarn add parse-help
bun add parse-help
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-04-08 |
| First published | 2015-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | parse, help, cli, argv, command-line, man, flags, arguments, alias, aliases, short |

## Links

- npm: https://www.npmjs.com/package/parse-help
- Repository: https://github.com/sindresorhus/parse-help
- Homepage: https://github.com/sindresorhus/parse-help#readme
- Issues: https://github.com/sindresorhus/parse-help/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/parse-help

## Dependencies (1)

- [execall](https://npm.io/package/execall.md) ^3.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

- 2.0.0 (latest) — 2021-04-08
- 1.0.0 — 2017-12-15
- 0.1.1 — 2016-05-01
- 0.1.0 — 2015-12-30

## README

# parse-help

> Parse CLI help output

## Install

```
$ npm install parse-help
```

## Usage

```js
import parseHelp from 'parse-help';

const help = `
	Usage
	  $ unicorn <name>

	Options
	  --rainbow    Lorem ipsum dolor sit amet
	  -m, --magic  Aenean commodo ligula eget dolor
	  --pony       Nullam dictum felis eu pede
	  -c, --color  Donec quam felis

	Examples
	  $ unicorn Peachy
	  $ unicorn Sparkle --rainbow --magic
`;

parseHelp(help);
/*
{
	flags: {
		rainbow: {
			description: 'Lorem ipsum dolor sit amet'
		},
		magic: {
			alias: 'm',
			description: 'Aenean commodo ligula eget dolor'
		},
		pony: {
			description: 'Nullam dictum felis eu pede'
		},
		color: {
			alias: 'c',
			description: 'Donec quam felis'
		}
	},
	aliases: {
		m: 'magic',
		c: 'color'
	}
}
*/
```

## Related

- [aliases](https://github.com/sindresorhus/aliases) - Parse flag aliases in CLI help output

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