{"_id":"argh","_rev":"159878","name":"argh","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"time":{"modified":"2021-06-03T11:39:16.000Z","created":"2013-04-12T12:56:49.719Z","1.0.0":"2019-05-15T21:43:42.712Z","0.1.4":"2015-07-06T12:09:29.835Z","0.1.3":"2014-06-23T14:42:00.138Z","0.1.2":"2014-06-23T12:23:50.936Z","0.1.1":"2013-10-02T11:47:53.910Z","0.1.0":"2013-05-27T15:50:30.664Z","0.0.1":"2013-05-06T13:48:48.751Z","0.0.0":"2013-04-12T12:56:49.719Z"},"users":{"rubiadias":true,"ragnarokkr":true,"mastayoda":true,"nguru":true},"author":{"name":"Arnout Kazemier"},"repository":{"type":"git","url":"git+ssh://git@github.com/3rd-Eden/argh.git"},"versions":{"1.0.0":{"name":"argh","version":"1.0.0","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha --reporter spec --ui bdd test.js","watch":"mocha --watch --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/3rd-Eden/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier"},"license":"MIT","devDependencies":{"assume":"~2.2.0","istanbul":"~0.4.5","mocha":"~6.1.4","pre-commit":"~1.2.0"},"gitHead":"94da601f1986e16d7589df740593b5a8c7d92d75","bugs":{"url":"https://github.com/3rd-Eden/argh/issues"},"homepage":"https://github.com/3rd-Eden/argh#readme","_id":"argh@1.0.0","_npmVersion":"6.4.0","_nodeVersion":"8.11.4","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"dist":{"shasum":"2486eb42089517c934b7e5f8775c21f266d52dec","size":4345,"noattachment":false,"key":"/argh/-/argh-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-1.0.0.tgz"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/argh_1.0.0_1557956622585_0.6153928185156876"},"_hasShrinkwrap":false,"publish_time":1557956622712,"_cnpm_publish_time":1557956622712},"0.1.4":{"name":"argh","version":"0.1.4","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha --reporter spec --ui bdd test.js","watch":"mocha --watch --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"assume":"1.2.x","istanbul":"0.3.x","mocha":"2.2.x","pre-commit":"1.0.x"},"gitHead":"3c13933b7a176f82cfb137b71d8eac457bd0a500","bugs":{"url":"https://github.com/observing/argh/issues"},"homepage":"https://github.com/observing/argh#readme","_id":"argh@0.1.4","_shasum":"3eb4d612973fc6b6dc6ef338f56f759f2ac5c3a6","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"3eb4d612973fc6b6dc6ef338f56f759f2ac5c3a6","size":5806,"noattachment":false,"key":"/argh/-/argh-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.1.4.tgz"},"publish_time":1436184569835,"_cnpm_publish_time":1436184569835,"_hasShrinkwrap":false},"0.1.3":{"name":"argh","version":"0.1.3","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"assume":"0.0.x","mocha":"1.20.x","pre-commit":"0.0.x"},"bugs":{"url":"https://github.com/observing/argh/issues"},"homepage":"https://github.com/observing/argh","_id":"argh@0.1.3","_shasum":"b3453ecaf16bbb5e746b9e84c52233eba22db553","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"b3453ecaf16bbb5e746b9e84c52233eba22db553","size":4939,"noattachment":false,"key":"/argh/-/argh-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.1.3.tgz"},"publish_time":1403534520138,"_cnpm_publish_time":1403534520138,"_hasShrinkwrap":false},"0.1.2":{"name":"argh","version":"0.1.2","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"chai":"1.5.x","mocha":"1.9.x","pre-commit":"0.0.x"},"bugs":{"url":"https://github.com/observing/argh/issues"},"homepage":"https://github.com/observing/argh","_id":"argh@0.1.2","_shasum":"352d491ffeec32f65b834615962131c743811618","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"352d491ffeec32f65b834615962131c743811618","size":4732,"noattachment":false,"key":"/argh/-/argh-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.1.2.tgz"},"publish_time":1403526230936,"_cnpm_publish_time":1403526230936,"_hasShrinkwrap":false},"0.1.1":{"name":"argh","version":"0.1.1","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"chai":"1.5.x","mocha":"1.9.x","pre-commit":"0.0.x"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/observing/argh/issues"},"_id":"argh@0.1.1","dist":{"shasum":"b94c9416efbe1ebf108803fb8bd5ee87658e1237","size":4695,"noattachment":false,"key":"/argh/-/argh-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"publish_time":1380714473910,"_hasShrinkwrap":false,"_cnpm_publish_time":1380714473910},"0.1.0":{"name":"argh","version":"0.1.0","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"chai":"1.5.x","mocha":"1.9.x","pre-commit":"0.0.x"},"readmeFilename":"README.md","_id":"argh@0.1.0","dist":{"shasum":"8f99dd1a077476f1035d3d9706570e7fbb18f107","size":4617,"noattachment":false,"key":"/argh/-/argh-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"publish_time":1369669830664,"_hasShrinkwrap":false,"_cnpm_publish_time":1369669830664},"0.0.1":{"name":"argh","version":"0.0.1","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"chai":"1.5.x","mocha":"1.9.x","pre-commit":"0.0.x"},"readmeFilename":"README.md","_id":"argh@0.0.1","dist":{"shasum":"959c5bcd0b845d68a4d104ad8dddaf0e39bee68c","size":4234,"noattachment":false,"key":"/argh/-/argh-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.0.1.tgz"},"_npmVersion":"1.1.71","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"publish_time":1367848128751,"_hasShrinkwrap":false,"_cnpm_publish_time":1367848128751},"0.0.0":{"name":"argh","version":"0.0.0","description":"light weight option/argv parser for node, it only parses options, nothing more then that.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/mocha $(find test -name '*.test.js')"},"repository":{"type":"git","url":"git@github.com:observing/argh.git"},"keywords":["argument","args","option","parser","cli","argv","options","command","command-line"],"author":{"name":"Arnout Kazemier","email":"opensource@observe.it"},"license":"MIT","devDependencies":{"chai":"1.5.x","mocha":"1.9.x"},"readmeFilename":"README.md","_id":"argh@0.0.0","dist":{"shasum":"215fefdc5b004bb40b8dc712057c07c8c8ca31f3","size":3333,"noattachment":false,"key":"/argh/-/argh-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/argh/download/argh-0.0.0.tgz"},"_npmVersion":"1.1.71","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"publish_time":1365771409719,"_hasShrinkwrap":false,"_cnpm_publish_time":1365771409719}},"readme":"# argh!\n\n`argh` is an extremely light weight options or `process.argv` parser for node.js.\nIt only includes the bare minimal to parse options. It's not a full blown cli\nlibrary, but it can be used as a dependency of a cli library to do all the heavy\nlifting.\n\n`argh` was born out of rage, every cli library that we've found did more than\nthey advertised and added unneeded bloat to what we were trying to achieve... and\nthat was argument parsing. Tiny modules should only focus on one thing and do\nthat one thing really well.\n\n### Installation\n\n```\nnpm install argh --save\n```\n\n### Usage\n\n`argh` has two functions:\n\n1. A simple parser interface for custom option parsing using `argh(..)`\n2. A lazy loaded parsed results for the `process.argv` using `argh.argv`\n\n```js\nvar argh = require('argh');\n\n// You can directly access the parsed arguments of the node process through\nconsole.log(argh.argv);\n\n// This the same result as running\nconsole.log(argh(process.argv));\n```\n\n#### So what is supported?\n\n- `--arg` or `-a` Is transformed to a boolean (true) if no value is given\n- `-abc` Is transformed to multiple booleans.\n- `--no-arg`, `--disable-arg` Is transformed to a boolean (false)\n- `-no-abc`, `--disable-abc` Is transformed to multiple booleans (false)\n- `--foo bar`, `--foo=\"bar\"`, `--foo='bar'` or `--foo=bar` Is all transformed\n  to key / value pairs. Where `foo` is the key and `bar` the value\n- `--port 1111` Automatically transforms the string 1111 in a number\n- `--beer true` As you might have guessed it, it's transformed into a boolean\n- `--` Can be used as an indicator to stop parsing arguments.\n\n### Examples\n\nEverybody likes examples, let's assume that the following code is stored as `parse.js`:\n\n```js\nvar argv = require('argh').argv;\n\nconsole.log(argv);\n```\n\nParsing a single argument:\n\n```\n$ node parse.js --foo\n\n{ foo: true }\n```\n\nParsing multiple arguments:\n\n```\n$ node parse.js --foo bar --bar='baz'\n\n{ foo: 'bar', bar: 'baz' }\n```\n\nParsing multiple boolean arguments:\n\n```\n$ node parse.js --foo --no-bar -s --no-f\n\n{ foo: true,\n  bar: false,\n  s: true,\n  f: false }\n```\n\nParsing multiple short arguments:\n\n```\n$ node parse.js -abc -no-def\n\n{ a: true, b: true, c: true, d: false, e: false, f: false }\n```\n\nParsing different values:\n\n```\n$ node parse.js --awesome true --port 1111\n\n{ awesome: true, port: 1111 }\n```\n\nCombining arguments in to an object:\n\n```\n$node parse.js --redis.port 8080 --redis.host localhost\n\n{ redis: { port: 8080, host: 'localhost' }\n```\n\nHandling rest arguments:\n\n```\n$ node parse.js --argh --is --awesome -- 1111 --pewpew aaarrgghh\n\n{ argh: true,\n  is: true,\n  awesome: true,\n  argv: [ '1111', '--pewpew', 'aaarrgghh' ] }\n```\n\nAll unknown arguments are also directly pushed in to the `argv` property:\n\n```\n$ node parse.js --foo 111 bar unkown --hello world BUUURRRRRNN\n\n{ foo: 111,\n  argv: [ 'bar', 'unkown', 'BUUURRRRRNN' ],\n  hello: 'world' }\n```\n\nParsing duplicate flags:\n\n```\n$ node parse.js --item foo --item bar --item baz\n\n{ item: [ 'foo', 'bar', 'baz' ] }\n```\n\n## License\n\n[MIT](LICENSE)\n","_attachments":{},"homepage":"https://github.com/3rd-Eden/argh#readme","bugs":{"url":"https://github.com/3rd-Eden/argh/issues"},"license":"MIT"}