open-index/open-npm huggingface dataset:
npm package: @protolus/terminal-app
Description: Utility for creating command line applications
Author: Abbey Hawk Sparrow
Latest version: 0.0.1

@protolus/terminal-app
======================

This gives you a few features for your app:

- action centric structure (`<app-name> <action> <other stuff>`)
- automatic handling of commented JSON config files and setting values therein
- automatic handling of optional `~/.<app-name>` directories (and easy init)
- automatic handling of classes of plugins installed in `~/.<app-name>`
    - simple require shim for plugin loading
    - automated installation and (eventually) maintenance
- handle ansi configuration of [`yargs`]() and adding some features/simplifications
    - handle flag collisions
    - (eventually) formatting widths to terminal width
    - (eventually) handle other libraries
- rights notifications & licensing information
- (eventually) [man pages](https://gist.github.com/dominikwilkowski/cba6c8c6b1ded8d3e3cc6bf0b7ddc432)
- test harness (use common tests/data between CLI and Classes)

Installation
------------

```bash
npm install @protolus/terminal-app
```

Usage
-----

```js
var app = new CLApp('app-name', {
    copyright : 'Ed Beggler',
    copystart : '2020',
    defaults : `{
  // This file was autogenerated by app-name
  //
  "name": "robble-rauser",
  "type": "*",
  "debug": false
}`
});
```

### .command(<options>)
Define a command, with it's runtime logic

```js
app.command({});
```

### .argument(<options>)
Define a flag or argument to be passed to one or more commands

```js
app.argument({});
```

### .help()
Enable help function via `--help` or `-h`

```js
app.help();
```

### .header(<options>)
The prefix to all the documentation

```js
app.header({});
```

### .footer(<options>)
The suffix to all the documentation

```js
app.footer({});
```

### .plugins(<options>, <callback>)
Enable and load sets of plugins

```js
app.plugins({}, cb);
```

### .useable(<options>, <callback>)
allow the user to interactively alter the config file

```js
app.useable(cb);
```

### .config(<callback>)
Get the app's current configuration

```js
app.config(cb);
```

### .run(<callback>)
Execute based on the existing configuration.
```js
app.run(cb);
```

## Events

using `.on()`, `.off()`, `.emit()` and `.once()` the user can interact with events that are generated from the object.

    - `plugins-installed` : one or more plugins has been installed.

Roadmap
-------
[More to come]