# cli-go

> Create CLI's in seconds, from the CLI.

Latest version **1.0.4** (published 2020-06-12) · ISC license · 0 weekly downloads

## Install

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

Provides the command `cli-go`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-06-12 |
| First published | 2020-05-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Salvage_Dev |
| Maintainers | salvage_dev |
| Keywords | cli, go |

## Links

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

## Dependencies (6)

- [boxen](https://npm.io/package/boxen.md) ^4.2.0
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [outdent](https://npm.io/package/outdent.md) ^0.7.1
- [this.db](https://npm.io/package/this.db.md) ^1.0.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.1
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.0.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-06-12
- 1.0.3 — 2020-06-06
- 1.0.2 — 2020-06-06
- 1.0.1 — 2020-05-26
- 1.0.0 — 2020-05-19

## README

# ez-args

Parse args with ease!

```js
const ez = require("ez-args");
const program = new ez();
program.command({
  name: "test",
  description: "Test stuff!",
  flags: ["-t", "--t"],
});
program.start();
if (program.parsed.test) {
  console.log("You called the test flag!");
} else {
  console.log("You did not call the the test flag");
}
program.use(require("<plugin or file>"),options);
//Use a plugin which will have standard commands, or you can require a file.
//To create a plugin, go into your plugin folder and do the following:
module.exports = (parser, options) => {
  //Put your code here, parser is the program and has all properties
  //Options is an object which will take in all data passed through in the second param when using <program>.use
  program.command({
    name: "test",
    description: "Test stuff!",
    flags: ["-t", "--t"],
    code: (data) => {
      //You can now use a callback for executing code when the flag is called
    },
  });
  //Want to add functions to it via a plugin, you can do this:
  return {
    callName: 'test', //callName is required so you can do; program.<callname>.<method>;
    method1(){
      //do code
    }
    method2(){
      //Do some other code. You can then use these functions in your main cli where you are using the module like so:
      //program.test.method1();
      //Please note this is an example!
    }
  }
};
```

This code created a program, adds a command and will check some values. NOTE: program.parsed returns all expected values which exist. Also note that program.start(); has to be below all of the command adding.<br>
program.parsed.test works because you added the command with the name test, this works like this for all other commands.<br>
**Official plugins:** ez-args-help | ez-args-json <br>
These plugins are all on NPM.

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