# menhera-cli

> a cli plugin for menhera

Latest version **0.3.6** (published 2018-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install menhera-cli
pnpm add menhera-cli
yarn add menhera-cli
bun add menhera-cli
```

Provides the command `mhr`.

## 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.3.6 |
| Published | 2018-05-11 |
| First published | 2018-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | chito |
| Maintainers | vaiii |

## Links

- npm: https://www.npmjs.com/package/menhera-cli
- npm.io page: https://npm.io/package/menhera-cli

## Dependencies (13)

- [ora](https://npm.io/package/ora.md) ^2.0.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.2
- [menhera](https://npm.io/package/menhera.md) ^0.7.1-rc
- [fs-extra](https://npm.io/package/fs-extra.md) ^6.0.1
- [@types/ora](https://npm.io/package/@types/ora.md) ^1.3.4
- [koa-compose](https://npm.io/package/koa-compose.md) ^4.0.0
- [cli-spinners](https://npm.io/package/cli-spinners.md) ^1.3.1
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^10.0.0
- [menhera-utils](https://npm.io/package/menhera-utils.md) ^0.0.1
- [menhera-message](https://npm.io/package/menhera-message.md) ^0.0.1
- [@types/log-update](https://npm.io/package/@types/log-update.md) ^2.0.0
- [download-git-repo](https://npm.io/package/download-git-repo.md) ^1.0.2
- [@types/koa-compose](https://npm.io/package/@types/koa-compose.md) ^3.2.2

## Recent versions

- 0.3.6 (latest) — 2018-05-11
- 0.3.5-rc4 — 2018-04-29
- 0.3.5-rc3 — 2018-04-28
- 0.3.5-rc2 — 2018-04-28
- 0.3.5-rc1 — 2018-04-28
- 0.3.4 — 2018-04-28
- 0.3.3-rc4 — 2018-04-26
- 0.3.3-rc3 — 2018-04-25
- 0.3.3-rc2 — 2018-04-25
- 0.3.3-rc1 — 2018-04-25
- 0.3.2 — 2018-04-25
- 0.3.1-rc7 — 2018-04-25
- 0.3.1-rc6 — 2018-04-24
- 0.3.1-rc5 — 2018-04-24
- 0.3.1-rc4 — 2018-04-24
- … 60 more at https://npm.io/package/menhera-cli/versions

## README

# Menehra-CLI

a cli plugin for menhera

## Use for CLI Tools

```bash
$ yarn global add menhera-cli
```

#### Install Template

```bash
$ mhr e init:cli
```

```bash
$ mhr e init:module
```

## Use For Module

```bash
$ yarn add menhera menhera-cli
```

#### example

```js
// index.js
const mhr = require("menhera").default;
const CLI = require("menhera-cli");

const Foo = CLI({ name: "Foo", version: "0.0.1" });

mhr.$use({
  _mount: {
    Foo
  },
  Foo: {
    commands: {
      _: {
        options: {
          test: { alias: "t", desc: "test", default: null }
        },
        exec({ _, _key, env }) {
          if (env.NONE_INPUTS) {
            _.$use({ Foo: { help: _key } });
          }
        }
      },
      foo: {
        desc: "Test foo",
        args: ["foo", "foo1"],
        examples: {
          foo: "foo 123"
        },
        exec({ foo }) {
          console.log(foo);
        }
      },
      bar: {
        desc: "Test bar",
        args: ["bar"],
        examples: {
          bar: "bar 456"
        },
        exec({ bar }) {
          console.log(bar);
        }
      }
    },
    config: {
      start: true
    }
  }
});


```

```bash
$ node index.js
```

![preview](./assets/cli.png)

![preview](./assets/examples.png)

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