open-index/open-npm huggingface dataset:
npm package: @kuscamara/cli-helper
Description: A multicommand CLI helper that uses yargs for command options and inquirer for prompt
Author: Kus Cámara
Latest version: 1.0.5

<!--
[![Build Status](https://travis-ci.com/kcmr/cli-helper.svg?branch=master)](https://travis-ci.com/kcmr/cli-helper)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![codecov](https://codecov.io/gh/kcmr/cli-helper/branch/master/graph/badge.svg)](https://codecov.io/gh/kcmr/cli-helper)
![Dependency status](https://img.shields.io/david/kcmr/cli-helper.svg)

[![NPM](https://nodei.co/npm/cli-helper.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/cli-helper/)
-->

# CliHelper

> A multicommand CLI helper that uses yargs and inquirer.

## Install

```bash
npm i @kuscamara/cli-helper
```

## Usage

`CliHelper` creates CLIs from the specified commands object and uses [yargs](https://www.npmjs.com/package/yargs) for command options and [inquirer](https://www.npmjs.com/package/inquirer) to prompt for missing params not passed as flags / options.

```js
const { CliHelper } = require('@kuscamara/cli-helper');
const cli = new CliHelper({ options });
```

### Options

- `description` (`string`): Main command description.
- `defaultCommandMessage` (`string`): Prompt message of the default command. Default "Choose a command". 
- `commands` (`object`): CLI commands. Accepts an `action` key (`function`) for each command that will receive the executed command and the command options as `options` object. The `params` property uses the same options that inquirer questions.

**Full example**

```js
const { CliHelper } = require('@kuscamara/cli-helper');

const cli = new CliHelper({
  description: 'My awesome CLI',
  commands: {
    'print': {
      desc: 'Prints something',
      params: {
        color: {
          message: 'Use colors in output',
          type: 'boolean'
        }
      },
      action: ({ command, options }) => {
        console.log(`${command} executed with ${options.color}`);
      }
    },
    'greet': {
      desc: 'Says hello',
      params: {
        name: {
          message: 'Name',
          type: 'string'
        }
      },
      action: ({ options }) => {
        console.log(`Hello ${options.name}!`);
      }
    }
  }
});

cli.run();
```

### Registering custom prompt types

```js
const { CliHelper } = require('@kuscamara/cli-helper');
const { PathPrompt } = require('inquirer-path');

CliHelper.registerPrompt('path', PathPrompt);

const cli = new CliHelper(options);

cli.run();
```

## License

This project is licensed under the [MIT License](LICENSE).
npm package: @kuscamara/create-lit-component
Description: Creates a LitElement Web Component
Author: Kus Cámara @kcmr
Latest version: 0.2.0

# LitElement Web Component generator

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Parcel](https://img.shields.io/badge/bundler-Parcel-brightgreen.svg)](https://parceljs.org/)

A minimal scaffold generator for Web Components with LitElement.

```sh
$ npm init kcmr/lit-component
```

![CLI Screenshot](cli-screenshot.png)

Features:

- Uses [**Parcel** bundler](https://parceljs.org/) for the component's demo (dev server). **Super fast** build and reload!
- [@open-wc/testing](https://open-wc.org/testing/) for unit tests (TDD style)
- Allows to import the component class without element registration. Define the tag as you like

## Usage

Install it globally and run it:

```sh
$ npm i -g kcmr/lit-component
$ lit-component
```

Or run it directly without installation (get always the latest version from github):

```sh
$ npm init kcmr/lit-component
```

## Options

Component:
- `-n`, `--name` Component name
- `-d`, `--description` Component description (used in description field inside package.json)
- `-s`, `--scope` Optional package scope (`@my-company`)
- `-i`, `--[no-]install` Install dependencies (`true`). Use `--no-install` to skip dependency installation
- `--silent` Use silent dependency installation

CLI:
- `-h`, `--help` Shows the CLI help
- `-v`, `--version` Shows the CLI version

## Config files or key in `package.json`

The CLI will remember the choices of the last execution with your preferences about the package scope but you can also use configuration files or a specific property in a `package.json` file.

- `lit-component` property in a `package.json`
- `.lit-componentrc` (JSON or YAML format)
- `.lit-componentrc.json`
- `.lit-componentrc.yaml`, `.lit-componentrc.yml`
- `.lit-componentrc.js`
- `lit-component.config.js`

Example config:

```json
{
  "scope": "@my-company",
  "description": "An awesome component",
  "install": false
}
```