This package has been deprecated

Author message:

Do not use

@meteor-it/argv
TypeScript icon, indicating that this package has built-in type declarations

0.4.48 • Public • Published

ARGV

Argument parser with automatic help generation

Example

import ArgParser from '@meteor-it/argv';

const parser = new ArgParser('NAME');

parser.command('command1')
    .callback(opts=>{
        console(opts.option);
    })
    .help("Useful command");

parser.command('sanity')
    .option('file', {
        abbr: 'f',
        help: 'Awesome file'
    })
    .option('config', {
        abbr: 'c',
        default: 'awesomeConfigFile.json',
        help: 'Useful config'
    })
    .callback(opts=> {
        console.log(opts.filename);
    })
    .help("Another useful command");

parser.help('Very useful CLI tool');
parser.parse(process.argv);

Package Sidebar

Install

npm i @meteor-it/argv

Weekly Downloads

0

Version

0.4.48

License

MIT

Unpacked Size

128 kB

Total Files

8

Last publish

Collaborators

  • f6cf
  • lach