# meta-parser

> Parse Markdown for CLI output

Latest version **0.1.0** (published 2014-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install meta-parser
pnpm add meta-parser
yarn add meta-parser
bun add meta-parser
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-05-08 |
| First published | 2014-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Noah H. Smith |
| Maintainers | noazark |

## Links

- npm: https://www.npmjs.com/package/meta-parser
- npm.io page: https://npm.io/package/meta-parser

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^0.4.0
- [marked](https://npm.io/package/marked.md) ^0.3.2

## Recent versions

- 0.1.0 (latest) — 2014-05-08

## README

Meta Parser
===========

Take comments from the head of a file and turn it into beautiful CLI ready text.
This is primarily used for documentation of CLI tools.

## Example:
```javascrpit
#!/usr/bin/env node
// # Basic Example
//
// Demonstrate the unbridled power of the Meta Parser
//
// ## Usage
// ```
// node ./examples/basic [command]
// ```
//
// ## Commands
// super   -   try it to find out
// crazy   -   try it to find out
// insane  -   try it to find out
// help    -   output the help docs
//
// > Exits with 1 if given an unknown command
//

var metaParser = require('meta-parser')
var command = process.argv[2]

var helpDocs = metaParser(__filename)

if (command === 'super') {
	console.log('something totally cool')
} else if (command === 'crazy') {
	console.log('brains may explode')
} else if (command === 'insane') {
	console.log('if words could explain')
} else if (command === 'help') {
	console.log(helpDocs)
} else {
	console.log('unknown command')
	process.exit(1)
}

process.exit(0)

```

**Result**
![Example CLI Output](screen-shot.png)

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