# nv-cli-basic

> nv-cli-basic =============== - nv-cli-basic - for creat cli project - similiar to minimist, more simple

Latest version **1.1.2** (published 2025-04-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-cli-basic
pnpm add nv-cli-basic
yarn add nv-cli-basic
bun add nv-cli-basic
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2025-04-14 |
| First published | 2021-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |
| Keywords | cli, command-line, argv, getopt, stdin, stdout, parser |

## Links

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

## Dependencies (3)

- [nv-array-split](https://npm.io/package/nv-array-split.md) ^1.0.2
- [nv-facutil-basic](https://npm.io/package/nv-facutil-basic.md) ^1.3.10
- [nv-file-sync-reader](https://npm.io/package/nv-file-sync-reader.md) ^1.0.4

## 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

- 1.1.2 (latest) — 2025-04-14
- 1.1.1 — 2025-03-16
- 1.1.0 — 2025-03-16
- 1.0.26 — 2025-01-10
- 1.0.25 — 2024-01-10
- 1.0.24 — 2024-01-10
- 1.0.23 — 2024-01-10
- 1.0.21 — 2024-01-10
- 1.0.18 — 2023-09-15
- 1.0.17 — 2023-09-15
- 1.0.14 — 2023-08-13
- 1.0.13 — 2023-08-13
- 1.0.11 — 2022-11-29
- 1.0.10 — 2022-11-29
- 1.0.9 — 2022-11-26
- … 9 more at https://npm.io/package/nv-cli-basic/versions

## README

nv-cli-basic
===============
- nv-cli-basic 
- for creat cli project   
- similiar to minimist, more simple

install
=======
- npm install nv-cli-basic  

usage
=====

    const creat_argv = require("nv-cli-basic");

    
example
-------

### bin.js
    
    #!/usr/bin/env node
    
    const creat_argv = require("nv-cli-basic");
    
    var cfg = {
        alias: {
            'efi':'e',
            'disabled':'d',
            'count':'c',
            'name':'n'
        },
        boolean: ["disabled"],
        string:  ["name"],
        defaults: {
            'count':1000
        },
        description: {
            'efi':'efi params',
            'disabled':'if the control-plane is disabled',
            'name':'the name,always treated as string',
            'count':'testing times, default 1000'
        }
    }
    
    
    var argv = creat_argv(cfg)
    
    console.log(argv);
    
    console.log("--generated usage: ----")
    
    console.log(argv.usage("projname"));
    
    
    console.log("---please input and then ctrl-D ---")
    
    function handler(s) {
        return(s.split("\n").join(" @@@@ "))
    }
    
    argv.rwstream(handler);

### output

    # node bin.js xy "b c d" -e fgh --efi 123 "({200:300})" -g ggg -n 55555555
    
    
    Argv {
      efi: [ 123, { '200': 300 } ],
      g: 'ggg',
      name: '55555555',
      _: [ 'xy', 'b c d' ],
      e: [ 123, { '200': 300 } ],
      n: '55555555',
      disabled: false,
      d: false,
      count: 1000,
      c: 1000
    }
    --generated usage: ----
    Usage: projname [options]
    Options:
        -e, --efi             efi params
        -d, --disabled        if the control-plane is disabled
        -n, --name            the name,always treated as string
        -c, --count           testing times, default 1000
    
    ---please input and then ctrl-D ---
    
    aaa
    bbb
    ccc
    ddd
     @@@@ aaa @@@@ bbb @@@@ ccc @@@@ ddd @@@@
    
    nv-cli-basic-#




METHODS
=======

    argv.alias_                argv.amd_                  argv.boolean_
    argv.cfg_                  argv.constructor           argv.defaults_
    argv.description_          argv.input_stream          argv.output_stream
    argv.pre_post_tem          argv.rwstream              argv.string_
    argv.usage



LICENSE
=======
- ISC

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