{"_id":"@antti5/cmd-line-args","_rev":"7-9ea7400d4cf34d8737894352ea8caacc","name":"@antti5/cmd-line-args","dist-tags":{"latest":"0.3.3"},"versions":{"0.1.0":{"name":"@antti5/cmd-line-args","version":"0.1.0","author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","_id":"@antti5/cmd-line-args@0.1.0","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"homepage":"https://github.com/antti5/cmd-line-args#readme","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"dist":{"shasum":"96a7b6f76ba0a005c258cdfa7ffa6b9ff811b826","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.1.0.tgz","fileCount":4,"integrity":"sha512-2dJkEoFF04YmgipEpO6jc0wjvBOwKBtO1t5QYbd2Q5mF3jEuADdld8Q2EvlNgnDtDTz0oHyvLGxuEYaOHRyUog==","signatures":[{"sig":"MEYCIQCCWBOozLwozdBlb4YdPX+cB5kdNL63+J6tppC6NUPcMgIhAPJ7FS3F9OefanJ1hsJ/gXJSYmyrJdA0BEB/W9wkYb8x","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4680},"main":"cmdLineArgs.js","type":"module","gitHead":"4b8b5109df2349abbfc04b83a62f314a002f0761","_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"repository":{"url":"git+https://github.com/antti5/cmd-line-args.git","type":"git"},"_npmVersion":"10.9.4","description":"Tiny wrapper for \"command-line-args\" and \"command-line-usage\"","directories":{},"_nodeVersion":"22.22.0","dependencies":{"command-line-args":"6.0.2","command-line-usage":"7.0.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cmd-line-args_0.1.0_1781795324460_0.7487378890758154","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@antti5/cmd-line-args","version":"0.1.1","author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","_id":"@antti5/cmd-line-args@0.1.1","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"homepage":"https://github.com/antti5/cmd-line-args#readme","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"dist":{"shasum":"3359b23fcb455564d38ddeca87b9d73a02122341","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.1.1.tgz","fileCount":4,"integrity":"sha512-IIyqe0vbt3RDM8xEz2oeLQTNPER5IRwRS14Gn0al2wuoOBhYO+Y3QBWJZlaUS19Oap8D02c86RPkztfk6ZrE5g==","signatures":[{"sig":"MEYCIQCgU4Bl64LT2TJElIMAyDqxK5Lyx2t4FG+LWPycNAha5wIhAIOiq6wTRODIUvxlt5yd4eXZUtJv0NHPPVZpfrsa3xGV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4676},"main":"cmdLineArgs.js","type":"module","gitHead":"240ae5b447954dc2d649f3600af8337b0126f5c4","_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"repository":{"url":"git+https://github.com/antti5/cmd-line-args.git","type":"git"},"_npmVersion":"10.9.4","description":"Tiny wrapper for \"command-line-args\" and \"command-line-usage\"","directories":{},"_nodeVersion":"22.22.0","dependencies":{"command-line-args":"6.0.2","command-line-usage":"7.0.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cmd-line-args_0.1.1_1781797402498_0.38111937505618343","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@antti5/cmd-line-args","version":"0.3.0","author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","_id":"@antti5/cmd-line-args@0.3.0","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"homepage":"https://github.com/antti5/cmd-line-args#readme","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"dist":{"shasum":"969bfe73b01586ff03c29026edf994c65450fb70","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.3.0.tgz","fileCount":6,"integrity":"sha512-6rjpH0N1I21rR1ZPs6GY622ZGB6xsUOy8nu84EBoAYrpryLoDchTeNOaVz/eHGBkjFqGy8f/b0QlGRzzGJlUTw==","signatures":[{"sig":"MEUCIBJA4LFed67dnbK0OBluINW9pAgs6aRVsQdsYWPds0kwAiEAp6UGB8++pga+IJI7ON1wi+ntDpK/pgK4qHh0FqCtOlM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9329},"main":"cmdLineArgs.js","type":"module","gitHead":"972fad9e1180eb466559d846ee616795117aa283","scripts":{"eslint":"eslint . --ignore-pattern \"node_modules/*\""},"_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"repository":{"url":"git+https://github.com/antti5/cmd-line-args.git","type":"git"},"_npmVersion":"10.9.4","description":"Wrapper with positional arguments for \"command-line-args\" and \"command-line-usage\"","directories":{},"_nodeVersion":"22.22.0","dependencies":{"lodash":"4.18.1","command-line-args":"6.0.2","command-line-usage":"7.0.4"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"10.7.0","globals":"17.7.0","@eslint/js":"10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cmd-line-args_0.3.0_1784602744279_0.3435421593979797","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@antti5/cmd-line-args","version":"0.3.1","author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","_id":"@antti5/cmd-line-args@0.3.1","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"homepage":"https://github.com/antti5/cmd-line-args#readme","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"dist":{"shasum":"c759d6e2e7e07f1db6ecd5601d02ec8af4cabf50","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.3.1.tgz","fileCount":6,"integrity":"sha512-BnZsVLVZEHG87nXN5KmqTUBtESyApI0xRhVbIxR2MFejniPBOCNPpEb6Qt1P4u5lxUHjSEW7J6vLN9MEOspUgA==","signatures":[{"sig":"MEQCIC6rtn7e4XToag4LAQ7XSFhpTortiRfGTCxRKmv2MQMIAiACOTPsEVJtLu32nIEmpY+RL/gz0AneDIGcGvQ4tiqCxg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9501},"main":"cmdLineArgs.js","type":"module","gitHead":"ee5b55aa886c4bed419d1d899f25ddb89928eca1","scripts":{"eslint":"eslint . --ignore-pattern \"node_modules/*\""},"_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"repository":{"url":"git+https://github.com/antti5/cmd-line-args.git","type":"git"},"_npmVersion":"10.9.4","description":"Wrapper with positional arguments for \"command-line-args\" and \"command-line-usage\"","directories":{},"_nodeVersion":"22.22.0","dependencies":{"lodash":"4.18.1","command-line-args":"6.0.2","command-line-usage":"7.0.4"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"10.7.0","globals":"17.7.0","@eslint/js":"10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cmd-line-args_0.3.1_1784603934588_0.2776178919012109","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@antti5/cmd-line-args","version":"0.3.2","author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","_id":"@antti5/cmd-line-args@0.3.2","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"homepage":"https://github.com/antti5/cmd-line-args#readme","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"dist":{"shasum":"0c40e05abf31b5e479bcb811d9dd6bb0e18b6726","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.3.2.tgz","fileCount":6,"integrity":"sha512-0HV5P1gre1OOIzcy/kWcinPEJxguUkEYesfRmEnS2nrAOvnKBSqDsiPbw2KCWdpopq8gcWdvXJ0ZJeUBFBU2fQ==","signatures":[{"sig":"MEUCICHDwq4soW8tl2+TCDTyDf+34GWEYAlthyucElEA90meAiEA6ZXYHoy9GpbP2LxmH+sJu1HGH2yJDQHtPn+STp9T2PA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12839},"main":"cmdLineArgs.js","type":"module","gitHead":"f1a754a56d22d6f2ae05dafdae0a6961287adeb9","scripts":{"eslint":"eslint . --ignore-pattern \"node_modules/*\""},"_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"repository":{"url":"git+https://github.com/antti5/cmd-line-args.git","type":"git"},"_npmVersion":"10.9.4","description":"Wrapper with positional arguments for \"command-line-args\" and \"command-line-usage\"","directories":{},"_nodeVersion":"22.22.0","dependencies":{"lodash":"4.18.1","command-line-args":"6.0.2","command-line-usage":"7.0.4"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"10.7.0","globals":"17.7.0","@eslint/js":"10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cmd-line-args_0.3.2_1784659174368_0.1676853555171951","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@antti5/cmd-line-args","version":"0.3.3","description":"Wrapper with positional arguments for \"command-line-args\" and \"command-line-usage\"","type":"module","main":"cmdLineArgs.js","repository":{"type":"git","url":"git+https://github.com/antti5/cmd-line-args.git"},"author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"homepage":"https://github.com/antti5/cmd-line-args#readme","scripts":{"eslint":"eslint . --ignore-pattern \"node_modules/*\""},"dependencies":{"command-line-args":"6.0.2","command-line-usage":"7.0.4","lodash":"4.18.1"},"devDependencies":{"@eslint/js":"10.0.1","eslint":"10.7.0","globals":"17.7.0"},"_id":"@antti5/cmd-line-args@0.3.3","gitHead":"23d882db36340219d1db2416c01db6cb9d4f8671","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-Cx2GtE5UQQkvw5PwJ9/zIUqTfr99Gw1iIx82zsD5JGNQcdsfVDzt9kq6wIUyP5eVuOY028D1dbF6gTbytxbkXw==","shasum":"c522d6a38b290042de807a5189cfd8781545a4e9","tarball":"https://registry.npmjs.org/@antti5/cmd-line-args/-/cmd-line-args-0.3.3.tgz","fileCount":6,"unpackedSize":12839,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDcmdQ8kSgBNSyl1lhhm/lJbqheIb36VFQWX5IZLK/exwIgZTZSAp6iggNQLctFHF1aHU4jVAY3vBswoS+mFOzHetI="}]},"_npmUser":{"name":"antti5","email":"antti.k.salonen@gmail.com"},"directories":{},"maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cmd-line-args_0.3.3_1784659380769_0.48861886236942254"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T15:08:44.392Z","modified":"2026-07-21T18:43:01.073Z","0.1.0":"2026-06-18T15:08:44.630Z","0.1.1":"2026-06-18T15:43:22.640Z","0.3.0":"2026-07-21T02:59:04.548Z","0.3.1":"2026-07-21T03:18:54.748Z","0.3.2":"2026-07-21T18:39:34.499Z","0.3.3":"2026-07-21T18:43:00.920Z"},"bugs":{"url":"https://github.com/antti5/cmd-line-args/issues"},"author":{"name":"Antti Salonen","email":"antti.k.salonen@gmail.com"},"license":"MIT","homepage":"https://github.com/antti5/cmd-line-args#readme","repository":{"type":"git","url":"git+https://github.com/antti5/cmd-line-args.git"},"description":"Wrapper with positional arguments for \"command-line-args\" and \"command-line-usage\"","maintainers":[{"name":"antti5","email":"antti.k.salonen@gmail.com"}],"readme":"# cmd-line-args\n\nThis is a wrapper for the Node.js packages [command-line-args](https://github.com/75lb/command-line-args) and [command-line-usage](https://github.com/75lb/command-line-usage) that adds support for positional arguments.\n\nAdditionally, the wrapper automatically uses \"command-line-usage\" to provide an usage guide from the same input.\n\n## Positional arguments\n\nIn place of the `defaultOption` argument, one or more of the arguments can be marked with `positional: true`. The relative order of positional arguments in the option definitions array is significant.\n\nThe last positional argument can have `multiple: true`, in which case the given values are returned as an array.\n\nInternally, the wrapper combines the positional arguments into a single `defaultOption` argument, and after parsing again splits them back into multiple arguments according to the option definitions array.\n\n**Note:** The input to the wrapper must not include a `defaultOption` argument. Use `positional` instead.\n\n## Mandatory arguments\n\nArguments can be marked mandatory with `mandatory: true`. If a mandatory argument is not given, usage help is shown and the process exits.\n\nFor positional arguments, mandatory arguments must be listed before optional arguments. This is because the relative order of positional arguments is significant.\n\n## Usage help\n\nThe first two arguments to the wrapper are the name and description of the command. Additionally, each argument can be provided with a `description` property that contains a human-readable description.\n\nBy default, the wrapper injects a `--help` or `-h` option that can be used to show usage help. If you need to use `-h` for some other purpose, pass `{ nohelp: true }` as the last argument to the wrapper.\n\n## Example\n\nIn the following example there are two positional arguments, the latter of which (`file`) can be speficied multiple times. In addition, there are three optional named arguments.\n\n    cmdLineArgs(\n       'grep',\n       'Search for patterns in input',\n       [\n          { name: 'pattern', positional: true, mandatory: true, description: 'Regular expression' },\n          { name: 'file', positional: true, multiple: true, description: 'One or more filenames' },\n          { name: 'invert', alias: 'v', type: Boolean, description: 'Print non-matching lines' },\n          { name: 'before', alias: 'B', type: Number, description: 'Print lines before context' },\n          { name: 'after', alias: 'A', type: Number, description: 'Print lines after context' }\n       ]\n    );\n\nIf the program is run without any arguments, the program automatically exits and the following output is printed to guide the user:\n\n    Missing positional argument: pattern\n\n    Run \"grep --help\" for usage help\n\nIf the user runs the program with `--help` the full usage help is shown. The format of this usage help is fixed, but should follow common conventions.\n\n    grep\n    \n      Search for patterns in input\n    \n    Synopsis\n    \n      $ grep pattern [file...]\n    \n    Positional arguments\n    \n      pattern   Regular expression\n      file      One or more filenames\n    \n    Optional arguments\n    \n      -v, --invert          Print non-matching lines\n      -B, --before number   Print lines before context\n      -A, --after number    Print lines after context\n      -h, --help            Show this help\n\n\n\n","readmeFilename":"README.md"}