argy-args
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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 --

Readme

Keywords

none

Package Sidebar

Install

npm i argy-args

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

22.3 kB

Total Files

12

Last publish

Collaborators

  • capure