# @streamyflow/cli-mate

> A compact CLI option and argument parser

Latest version **0.1.5** (published 2024-06-12) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @streamyflow/cli-mate
pnpm add @streamyflow/cli-mate
yarn add @streamyflow/cli-mate
bun add @streamyflow/cli-mate
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2024-06-12 |
| First published | 2022-05-31 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 90.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | streamyflow |
| Keywords | cli |

## Links

- npm: https://www.npmjs.com/package/@streamyflow/cli-mate
- npm.io page: https://npm.io/package/@streamyflow/cli-mate

## Dependencies (1)

- [@streamyflow/terminal](https://npm.io/package/@streamyflow/terminal.md) ^1.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2024-06-12
- 0.1.4 — 2024-02-16
- 0.1.3 — 2023-10-29
- 0.1.2 — 2023-04-26
- 0.1.1 — 2022-12-13
- 0.1.0 — 2022-05-31

## README

# cli-mate - A compact command options and argument parser

## Usage

A small but complete example is shown below.

```
import cli from "cli-mate";

var invocation = cli.on("1.0.1").configure({
        contents: {
            prologue: `Description:
        The mv-cli utility renames the file named by the source operand to the destination path named by the target operand.
        If the target operand names an existing directory, mv-cli moves each file named by a source operand to a destination file in the named
        destination directory.`,
            epilogue: "The mv-cli utility is expected to be IEEE Std 1003.2 (''POSIX.2'') compatible."
        }
    }).parse("mv-cli file moving utility", {
        force: {
            value: false,
            doc: `Do not prompt for confirmation before overwriting the destination path.`,
        },
        verbose: {
            value: false,
            doc: `Cause mv-cli to be verbose, showing files after they are moved.`
        },
    },
    "source", [], "destination"
);
if (invocation) {
    console.log(`  Force flag: ${invocation.opts.force.value}`);
    console.log(`Verbose flag: ${invocation.opts.verbose.value}`);
    console.log(`   Source(s): ${invocation.args.filter((e, i, a) => i < a.length - 1)}`);
    console.log(` Destination: ${invocation.args[2]}`);
}
```

Now excute the following

```
$ lab/mv-cli.mjs --help
```
Output

```
Usage:	mv-cli.mjs [ options ] source ... destination
	mv-cli file moving utility
Description:
        The mv-cli utility renames the file named by the source operand to the destination path named by the target operand.
        If the target operand names an existing directory, mv-cli moves each file named by a source operand to a destination file in the named
        destination directory.
Available options:
	-f, --force
		Do not prompt for confirmation before overwriting the destination path.  (The -f option overrides any previous -i or -n options.)
	--help	Show this help information
	-v, --verbose
		Cause mv-cli to be verbose, showing files after they are moved.
	--version
		Show version
The mv-cli utility is expected to be IEEE Std 1003.2 (''POSIX.2'') compatible.
```

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