# eoptimist

> Extended Optimist

Latest version **0.1.4-2-beta** (published 2014-02-15) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4-2-beta |
| Published | 2014-02-15 |
| First published | 2012-09-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.8.1 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jan Święcki |
| Maintainers | jan-swiecki |
| Keywords | extended optimist, eoptimist |

## Links

- npm: https://www.npmjs.com/package/eoptimist
- Repository: https://github.com/jan-swiecki/node-eoptimist
- Issues: https://github.com/jan-swiecki/node-eoptimist/issues
- npm.io page: https://npm.io/package/eoptimist

## Dependencies (3)

- [colors](https://npm.io/package/colors.md) >=0.6.0-1
- [js-yaml](https://npm.io/package/js-yaml.md) >=1.0.2
- [optimist](https://npm.io/package/optimist.md) >=0.0.2

## Recent versions

- 0.1.4-2-beta (latest) — 2014-02-15
- 0.1.4-1-beta — 2012-09-19
- 0.1.3 — 2012-09-19
- 0.1.2-3 — 2012-09-19
- 0.1.2-2 — 2012-09-19
- 0.1.2-1 — 2012-09-19
- 0.1.2 — 2012-09-19
- 0.1.1-6 — 2012-09-19
- 0.1.1-5 — 2012-09-19
- 0.1.1-4 — 2012-09-19
- 0.1.1-3 — 2012-09-19
- 0.1.1-2 — 2012-09-19
- 0.1.1-1 — 2012-09-19
- 0.1.1 — 2012-09-19
- 0.1.0 — 2012-09-19

## README

# Eoptimist - Extended [optimist](https://github.com/substack/node-optimist)
# Version 0.1.4-1-beta

Note: Please consider using [Easy CLI](https://github.com/jan-swiecki/node-easy-cli) instead. [Easy CLI](https://github.com/jan-swiecki/node-easy-cli) is a project which emerged from this one.

# Additions

* Automatically scans (if exists) `package.json` file and adds `--version` (alias `--info`) CLI option that displays string:

		// e.g. "example-program 0.1.0"
		package.json.name + " " + package.json.version

* Automatically scans (if exists) `CLI.yaml` file and generate `--usage` (alias `--help`) CLI option using `CLI.yaml` keys.

	Example:

	We have `./CLI.yaml`, `./example-program.js` which is node application with `eoptimist` installed (i.e. we have executed `./npm install optimist`).

		/* example-program.js */

		// same as require('optimist').argv
		var argv = require('eoptimist').argv

	--

		# CLI.yaml
		name: example-program.js
		usage: example-program.js [options] [file]
		options:
		  h4x:
		    alias: h
		    description: omgh4x
		  wat:
		    alias:
		      - is
		      - dis
		    description: []
		    boolean: true
		  include FILE:
		    description: My awesome description.
		examples:
		  - node example-program.js --h4x awesome.js
		  - node example-program.js --include file.js

	--

		$ node example-program.js --usage

		Usage: example-program.js [options] [file]

		Options:
		  --version, --info   Display current version                          [boolean]
		  --usage, --help     Display help                                     [boolean]
		  --h4x, -h           omgh4x
		  --wat, --is, --dis                                                   [boolean]
		  --include FILE      My awesome description.
		Examples:
		  node example-program.js --h4x awesome.js
		  node example-program.js --include file.js

  	--

		$ node example-program.js --version
		example-program 0.1.0

# Installation

`npm install eoptimist`

or

	git clone https://github.com/jan-swiecki/node-eoptimist
	mkdir node_modules
	mv node-eoptimist node_modules/eoptimist
	cd node_modules/eoptimist
	npm install

(On windows use `move` instead of `mv`)

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