All Projects → berdon → minimist2

berdon / minimist2

Licence: MIT License
TypeScript/JavaScript ES6 rewrite of popular Minimist argument parser

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to minimist2

declarative-parser
Modern, declarative argument parser for Python 3.6+
Stars: ✭ 31 (+55%)
Mutual labels:  argument-parser, argparse, command-line-parser
Argumentparser
Faster, easier, more declarative parsing of command line arguments in Objective-C/Foundation.
Stars: ✭ 251 (+1155%)
Mutual labels:  argument-parser, command-line-parser
Argagg
A simple C++11 command line argument parser
Stars: ✭ 180 (+800%)
Mutual labels:  argument-parser, command-line-parser
args
Simple and type-safe commandline argument parser for C++14
Stars: ✭ 63 (+215%)
Mutual labels:  argument-parser, command-line-parser
Argh
Argh! A minimalist argument handler.
Stars: ✭ 752 (+3660%)
Mutual labels:  argument-parser, command-line-parser
Clikt
Multiplatform command line interface parsing for Kotlin
Stars: ✭ 1,658 (+8190%)
Mutual labels:  argument-parser, command-line-parser
argparse dataclass
Declarative CLIs with argparse and dataclasses
Stars: ✭ 30 (+50%)
Mutual labels:  argparse, command-line-parser
Argparse
Argparse for golang. Just because `flag` sucks
Stars: ✭ 294 (+1370%)
Mutual labels:  argument-parser, command-line-parser
argparse-to-class
Transform argparse into class format for Jupyter Notebook execution
Stars: ✭ 20 (+0%)
Mutual labels:  argument-parser, argparse
CmdLine2
Command line argument parser (C++14)
Stars: ✭ 18 (-10%)
Mutual labels:  argument-parser, command-line-parser
docopt-ng
Humane command line arguments parser. Now with maintenance, typehints, and complete test coverage.
Stars: ✭ 94 (+370%)
Mutual labels:  argument-parser, argparse
Clap
Create your command-line parser, with all of the bells and whistles, declaratively or procedurally.
Stars: ✭ 7,174 (+35770%)
Mutual labels:  argument-parser, command-line-parser
Kotlin Argparser
Easy to use and concise yet powerful and robust command line argument parsing for Kotlin
Stars: ✭ 431 (+2055%)
Mutual labels:  argument-parser, command-line-parser
Programoptions.hxx
Single-header program options parsing library for C++11
Stars: ✭ 112 (+460%)
Mutual labels:  argument-parser, command-line-parser
Caporal.js
A full-featured framework for building command line applications (cli) with node.js
Stars: ✭ 3,279 (+16295%)
Mutual labels:  argument-parser, command-line-parser
jsonargparse
Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
Stars: ✭ 168 (+740%)
Mutual labels:  argument-parser, argparse
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (+530%)
Mutual labels:  command-line-tool, command-line-parser
AnyOption
C/C++ Command line and resource file option parsing
Stars: ✭ 83 (+315%)
Mutual labels:  argument-parser, command-line-tool
argparser
Simple command-line parser for C/C++ programs
Stars: ✭ 50 (+150%)
Mutual labels:  argument-parser, command-line-parser
dropt
dropt is yet another C library for parsing command-line options.
Stars: ✭ 39 (+95%)
Mutual labels:  argument-parser, command-line-parser

Minimist2

Build Status NPM Status

Minimist2 is a rewrite of the popular Minimist Javascript library for argument parsing. The library aims to be a drop-in replacement with matching API footprint. It passes all original Minimist unit tests.

Minimist2 is written in TypeScript targetting ES6.

Installing

npm install minimist2

Development

  1. Checkout the code
    git clone [email protected]:berdon/minimist2.git
    npm install
  2. Develop
  3. Run tests
    npm test
  4. Submit a pull request

Using

var argv = require('minimist2')(process.argv.slice(2));
console.dir(argv);
$ node example/parse.js -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
  x: 3,
  y: 4,
  n: 5,
  a: true,
  b: true,
  c: true,
  beep: 'boop' }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].