2.0.4 • Published 2 years ago

@minargs/cli v2.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@minargs/cli

This CLI is a companion/utility to minargs allowing you to test out what the parser will return in various scenarios.

Installation

# install package globally & call bin...
npm install @minargs/cli -g && minargs

# or, use `npx` to install & call bin...
npx -- @minargs/cli "<args>" [<options>]

Usage

minargs "<args>" [<options>]

Options

  • --alias (alias: a)
  • --recursive (alias: r) Default: false
  • --positionalValues (alias: p) Default: false

Examples

Get the # of times a arg was defined (also, using alias')...

minargs "--foo -f -f -ffff" -a f:foo | jq '.args.foo | length'

Reading from stdin...

"--foo --bar baz" | minargs