# argv.js Simple argv parser ## Motivation I needed a new argv parser for a quick and dirty project I was working on and evaluating and selecting the proper existing parser and then learning its API, quirks and adapting the architecture to it seemed to be more complicated, require more effort and far less fun than putting together a trivial parser myself in a couple of hours. This code is an evolution of that parser. ## Features - Simple - Supports both the _option_ (a-la `ls`) and _command_ (a-la `git`) paradigms - Nestable parsers can be nested as option/command handlers defining independent nested contexts - Option expansion `-abc` expands to `-a -b -c` if `-abc` is not defined - Option/command value passing implicit `-a 123` (requires definition or manual handling) or explicit `-a=123` - Environment variable option/command value defaults - Option/command value conversion - Option/command value collection - Multiple option prefix support - Reasonable defaults: - `-help` – generate and print help - `-version` – print version - `-quiet` – suppress printing - `-` – stop argument processing - Extensible: - Hooks for dynamic option/command handling - Customizable error and stop condition handling ## Planned Features - Run `-` scripts - Option doc grouping (???) ## Contents - [argv.js](#argvjs) - [Motivation](#motivation) - [Features](#features) - [Planned Features](#planned-features) - [Contents](#contents) - [Installation](#installation) - [Basic usage](#basic-usage) - [Error reporting](#error-reporting) - [XXX add subsections by task](#xxx-add-subsections-by-task) - [Configuration](#configuration) - [Option/command configuration](#optioncommand-configuration) - [`