# harmonious

> Ensure that node is run as the correct version, and uses --harmony, if needed

Latest version **0.5.18** (published 2015-09-10) · MIT license · 0 weekly downloads

## Install

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

## 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.5.18 |
| Published | 2015-09-10 |
| First published | 2015-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.26 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Travis Webb |
| Maintainers | xtuple |
| Keywords | n, nvm, version, manager, package.json, engines, harmony, es6, require, module, cli, commander, ensure, default, process, node, version, manager |

## Links

- npm: https://www.npmjs.com/package/harmonious
- Repository: https://github.com/xtuple/harmonious
- Issues: https://github.com/xtuple/harmonious/issues
- npm.io page: https://npm.io/package/harmonious

## Dependencies (2)

- [npmlog](https://npm.io/package/npmlog.md) 0.1.1
- [semver](https://npm.io/package/semver.md) 2.3.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.5.18 (latest) — 2015-09-10

## README

# harmonious

Ensure that your Node.js CLI apps are loaded with the correct Node version based on `engines.node` in package.json, and with --harmony if needed.

## Usage

As simple as can be:

```js
{
  "engines": {
    "node": "=0.11.13"
  }
}
```

File **app.js**:
```js
#!/usr/bin/env node

var harmony = require('./harmonious');
harmony('./lib/cli');
```

**`harmonious`** will ensure that regardless of how you invoke your app,
`harmony` extensions will be loaded. These will all work:
```bash
$ ./app
$ node app
$ node --harmony app
$ n use 0.11.13 app
```

Say you have a global `bin` you want to use:
```json
{
  "bin": {
    "myapp": "app.js"
  }
}
```
You don't have to worry about trying to shove `--harmony` somewhere:
```
$ sudo myapp
$ sudo node myapp
```

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