argy-args
v1.0.0
Published
A simple command line args and options parser for node.
Downloads
3
Readme
Argy
A simple command line args and options parser for node.
Installation
$ yarn add argy-args
Usage
import { Argy } from "./argy";
const argy = new Argy();
argy.setAppName("Argy example");
argy.addArgument("volume", {
prefix: "long",
takesValue: true,
required: true,
callback: (value) => {
console.log("volume: ", value);
},
});
argy.addAlias("volume", "vol", { prefix: "short" });
argy.addAutoHelp();
argy.execArguments();
Help example
$ app --help
-- ARGY EXAMPLE - HELP --
"--volume=value" - No description
"-vol=value" - Alias to "--volume"
"--help" - Displays help information
-- ARGY EXAMPLE - HELP --