# Muffin Dev for Node - Kapp - CLI

Kapp provides some useful commands that will make your life easier.

## Summary

### Generators

- [`generate:config`](./generate-config.md): generate a configuration file that contains the default app configuration

## How to use

In order to use the Kapp CLI, you can either install it globally, or create a shortcut in your `package.json` to use the local Kapp install.

### Use Kapp globally

Install Kapp globally with npm by just adding the `-g` option:

```bash
npm i -g @muffin-dev/kapp
```

... And that's it, you're already setup to use the CLI from anywhere on your machine, by just opening a terminal window in your Kapp projects. For example if you want to generate a configuration file:

```bash
cd /path/to/your/project
kapp generate:config ./ ./env/dev.json
```

### Use Kapp locally

Install Kapp locally:

```bash
npm i @muffin-dev/kapp
```

Now, open your `package.json` file, and add a `kapp` script:

```json
{
    "scripts": {
        "kapp": "kapp"
    }
}
```

Now, if you want to use the Kapp CLI, you can use `npm run kapp`. Note that the other arguments will be applied to `npm run` instead of `kapp`. To avoid it, use the `--` operator. As an example, if you want to generate a config file:

```bash
npm run kapp -- generate:config ./ ./env/dev.json
```