commander-rc-adapter

0.1.1 • Public • Published

Commander.js/rc Argv Adapter

Build Status NPM


rc is a super helpful way to load cli tool configurations, but it doesn't work out of the box with Commander.js's style of arguments and flags.

This is a parser to make it easier to just plugin the args into rc.

Usage

var program = require('commander');
var argParser = require('commander-rc-adapter');
var rc = require('rc');
 
program
  .version('0.0.1')
  .option('-f, --foo-doo', 'add some foo')
  .option('-b, --bar <string>', 'add some bar');
program.parse(args);
 
var options = rc('appname', {/* default values */}, argParser(program));

Readme

Keywords

none

Package Sidebar

Install

npm i commander-rc-adapter

Weekly Downloads

0

Version

0.1.1

License

Apache-2.0

Last publish

Collaborators

  • garthdb