Skip to content

darcyclarke/minargs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

cli for the minimum viable argument parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published