{"_id":"@stdlib/cli-ctor","_rev":"3335708","name":"@stdlib/cli-ctor","description":"Command-line interface.","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"time":{"modified":"2024-07-10T07:47:32.000Z","created":"2021-07-06T23:21:53.190Z","0.2.1":"2024-02-21T21:50:49.255Z","0.2.0":"2024-02-14T03:45:45.549Z","0.1.1":"2023-10-03T23:22:41.932Z","0.1.0":"2023-09-22T03:48:16.298Z","0.0.3":"2022-02-16T16:48:52.182Z","0.0.2":"2021-08-22T21:35:53.982Z","0.0.1":"2021-07-06T23:21:53.190Z"},"users":{},"author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"versions":{"0.2.1":{"name":"@stdlib/cli-ctor","version":"0.2.1","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"doc":"./docs","lib":"./lib","dist":"./dist"},"types":"./docs/types","scripts":{},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/string-format":"^0.2.1","@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.1","@stdlib/utils-noop":"^0.2.1","minimist":"^1.2.0"},"devDependencies":{},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"gitHead":"64931c5fdb4abc3a339b619658d3b5acc089e556","_id":"@stdlib/cli-ctor@0.2.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"7d2edeeaa7aba3650f4a55acb62a1a70c9debcb2","size":20095,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.2.1.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.2.1_1708552249107_0.5060535709737792"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-21T21:50:49.255Z","publish_time":1708552249255,"_source_registry_name":"default","_cnpm_publish_time":1708552249255},"0.2.0":{"name":"@stdlib/cli-ctor","version":"0.2.0","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"benchmark":"./benchmark","doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/string-format":"^0.2.0","@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.0","@stdlib/utils-noop":"^0.2.0","minimist":"^1.2.0","@stdlib/error-tools-fmtprodmsg":"^0.1.1"},"devDependencies":{"@stdlib/assert-instance-of":"^0.1.1","@stdlib/assert-is-array":"^0.1.1","@stdlib/assert-is-browser":"^0.1.1","@stdlib/fs-read-file":"^0.1.1","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-min":"git+https://github.com/Planeshifter/tap-min.git","@stdlib/bench-harness":"^0.1.2","@stdlib/bench":"^0.3.1"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"gitHead":"7137673f0798ef13d7c9fd7becf78e557b1d583b","_id":"@stdlib/cli-ctor@0.2.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"8a208bf3dc7f45f83dce693921dec2e5c7d7ea01","size":20358,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.2.0.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.2.0_1707882345291_0.5907109021366606"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-14T03:45:45.549Z","publish_time":1707882345549,"_source_registry_name":"default","_cnpm_publish_time":1707882345549},"0.1.1":{"name":"@stdlib/cli-ctor","version":"0.1.1","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"benchmark":"./benchmark","doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/string-format":"^0.1.1","@stdlib/utils-define-nonenumerable-read-only-property":"^0.1.1","@stdlib/utils-noop":"^0.1.1","minimist":"^1.2.0","@stdlib/error-tools-fmtprodmsg":"^0.1.0"},"devDependencies":{"@stdlib/assert-instance-of":"^0.1.0","@stdlib/assert-is-array":"^0.1.0","@stdlib/assert-is-browser":"^0.1.0","@stdlib/bench":"^0.1.0","@stdlib/fs-read-file":"^0.1.0","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-min":"git+https://github.com/Planeshifter/tap-min.git"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"gitHead":"836b37cf688bfa381fcb3cb3a2dd327f0a94ad19","_id":"@stdlib/cli-ctor@0.1.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"e0a8e17ba1a78aa3c91f05304540a73851b20784","size":20480,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.1.1.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.1.1_1696375361674_0.27158541790304835"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-03T23:22:41.932Z","publish_time":1696375361932,"_source_registry_name":"default","_cnpm_publish_time":1696375361932},"0.1.0":{"name":"@stdlib/cli-ctor","version":"0.1.0","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"benchmark":"./benchmark","doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/string-format":"^0.1.0","@stdlib/utils-define-nonenumerable-read-only-property":"^0.1.0","@stdlib/utils-noop":"^0.1.0","minimist":"^1.2.0","@stdlib/error-tools-fmtprodmsg":"^0.1.0"},"devDependencies":{"@stdlib/assert-instance-of":"^0.0.8","@stdlib/assert-is-array":"^0.0.7","@stdlib/assert-is-browser":"^0.0.8","@stdlib/bench":"^0.0.12","@stdlib/fs-read-file":"^0.0.8","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-min":"git+https://github.com/Planeshifter/tap-min.git"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"gitHead":"4f2310de3494fe36f4b74db309593f63e9d24dcc","_id":"@stdlib/cli-ctor@0.1.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"39ba350afacde03ef20c700782f642b3a580f3d3","size":20487,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.1.0.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.1.0_1695354496001_0.9061000750509614"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-22T03:48:16.298Z","publish_time":1695354496298,"_source_registry_name":"default","_cnpm_publish_time":1695354496298},"0.0.3":{"name":"@stdlib/cli-ctor","version":"0.0.3","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"benchmark":"./benchmark","doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.0.x","@stdlib/utils-noop":"^0.0.x","minimist":"^1.2.0"},"devDependencies":{"@stdlib/assert-instance-of":"^0.0.x","@stdlib/assert-is-array":"^0.0.x","@stdlib/assert-is-browser":"^0.0.x","@stdlib/bench":"^0.0.x","@stdlib/fs-read-file":"^0.0.x","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-spec":"5.x.x"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"patreon","url":"https://www.patreon.com/athan"},"gitHead":"0ac8eae4c749cd3a812b7c4c7ee445a5738ae7e6","_id":"@stdlib/cli-ctor@0.0.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"shasum":"5b0a6d253217556c778015eee6c14be903f82c2b","size":15843,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.0.3.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.0.3_1645030132061_0.8377548980362219"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-02-16T16:51:51.817Z","publish_time":1645030132182,"_cnpm_publish_time":1645030132182},"0.0.2":{"name":"@stdlib/cli-ctor","version":"0.0.2","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","browser":{"process":"process/"},"directories":{"benchmark":"./benchmark","doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.0.x","@stdlib/utils-noop":"^0.0.x","minimist":"^1.2.0"},"devDependencies":{"@stdlib/assert-instance-of":"^0.0.x","@stdlib/assert-is-array":"^0.0.x","@stdlib/assert-is-browser":"^0.0.x","@stdlib/bench":"^0.0.x","@stdlib/fs-read-file":"^0.0.x","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-spec":"5.x.x"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"patreon","url":"https://www.patreon.com/athan"},"gitHead":"4e5bcc4c2d18f32e946887ee695cc321c1f34657","_id":"@stdlib/cli-ctor@0.0.2","_nodeVersion":"16.7.0","_npmVersion":"7.20.3","dist":{"shasum":"9e9bdddc08d4a19568eadea53931c43e4a7de8fd","size":15675,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.0.2.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.0.2_1629668153857_0.7560621336496116"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T02:13:56.398Z","publish_time":1629668153982,"_cnpm_publish_time":1629668153982},"0.0.1":{"name":"@stdlib/cli-ctor","version":"0.0.1","description":"Command-line interface.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","directories":{"benchmark":"./benchmark","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/cli-ctor.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/utils-define-nonenumerable-read-only-property":"^0.0.x","@stdlib/utils-noop":"^0.0.x","minimist":"^1.2.0"},"devDependencies":{"@stdlib/assert-instance-of":"^0.0.x","@stdlib/assert-is-array":"^0.0.x","@stdlib/assert-is-browser":"^0.0.x","@stdlib/bench":"^0.0.x","@stdlib/fs-read-file":"^0.0.x","proxyquire":"^2.0.0","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-spec":"5.x.x"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","utilities","utility","utils","util","cli","command-line","interface"],"funding":{"type":"patreon","url":"https://www.patreon.com/athan"},"gitHead":"ec0e83e3c3ac64e096218b4160937dcfab2ebc30","_id":"@stdlib/cli-ctor@0.0.1","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"shasum":"c31ba301f396b60af05dd9268779da2ab30af72f","size":15770,"noattachment":false,"key":"/@stdlib/cli-ctor/-/@stdlib/cli-ctor-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@stdlib/cli-ctor/download/@stdlib/cli-ctor-0.0.1.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"stdlib-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-ctor_0.0.1_1625613713025_0.13113345885885908"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T02:13:54.758Z","publish_time":1625613713190,"_cnpm_publish_time":1625613713190}},"readme":"<!--\n\n@license Apache-2.0\n\nCopyright (c) 2018 The Stdlib Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n-->\n\n\n<details>\n  <summary>\n    About stdlib...\n  </summary>\n  <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>\n  <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>\n  <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>\n  <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href=\"https://github.com/stdlib-js/stdlib\">GitHub</a>, and please consider <a href=\"https://opencollective.com/stdlib\">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>\n</details>\n\n# CLI\n\n[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->\n\n> Command-line interface.\n\n<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->\n\n<section class=\"intro\">\n\n</section>\n\n<!-- /.intro -->\n\n<!-- Package usage documentation. -->\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/cli-ctor\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar CLI = require( '@stdlib/cli-ctor' );\n```\n\n#### CLI( \\[options] )\n\nCommand-line interface (CLI) constructor.\n\n```javascript\nvar cli = new CLI();\n// returns <CLI>\n```\n\nThe constructor accepts the following `options`:\n\n-   **pkg**: package meta data, such as a `package.json` object.\n-   **version**: command-line interface version. Default: `pkg.version`.\n-   **title**: process title. If set to `true`, the default title is either `pkg.bin.<field>` or `pkg.name`. If set to a `string`, the function sets the process title to the specified string. If set to `false`, the function does not set the process title.\n-   **help**: help text. Default: `''`.\n-   **updates**: `boolean` indicating whether to check if a more recent version of a command-line interface exists in the package registry. In order to check for updates, the function requires both `pkg.name` and `pkg.version` meta data. Default: `true`.\n-   **argv**: an `array` of command-line arguments. Default: `process.argv`.\n-   **options**: command-line argument parser options.\n\nTo provide package meta data, such as the package `name` and `version`, set the `pkg` option.\n\n```javascript\nvar opts = {\n    'pkg': require( './package.json' )\n};\n\nvar cli = new CLI( opts );\n// returns <CLI>\n```\n\nTo specify a particular command-line interface version (overriding package meta data), set the `version` option.\n\n```javascript\nvar opts = {\n    'pkg': {\n        'name': 'beep',\n        'version': '1.1.1'\n    },\n    'version': '1.1.1-beta'\n};\n\nvar cli = new CLI( opts );\n// returns <CLI>\n\ncli.version();\n// => 1.1.1-beta\n```\n\nBy default, an instance sets the process title to either the first key in `pkg.bin` or to `pkg.name`. To explicitly set the process title, set the `title` option.\n\n```javascript\nvar proc = require( 'process' );\n\nvar opts = {\n    'title': 'beep-boop'\n};\n\nvar cli = new CLI( opts );\n// returns <CLI>\n\nconsole.log( proc.title );\n// => 'beep-boop'\n```\n\nTo disable setting the process title, set the `title` option to `false`.\n\n```javascript\nvar opts = {\n    'title': false\n};\n\nvar cli = new CLI( opts );\n// returns <CLI>\n```\n\nWhen the command-line flag `--help` is set, a command-line interface instance prints help text and exits the calling process. To specify the printed text, set the `help` option.\n\n<!-- eslint-disable stdlib/doctest-marker -->\n\n```javascript\nvar opts = {\n    'help': 'Usage: boop [options] <beep>',\n    'argv': [\n        '/usr/local/bin/node',\n        'foo.js',\n        '--help'\n    ]\n};\n\nvar cli = new CLI( opts );\n// => Usage: boop [options] <beep>\n```\n\nBy default, an instance resolves command-line arguments and flags via `process.argv`. To specify a custom set of command-line arguments, set the `argv` option.\n\n```javascript\nvar opts = {\n    'argv': [\n        '/usr/local/bin/node',\n        'foo.js',\n        'a',\n        'b',\n        'c'\n    ]\n};\n\nvar cli = new CLI( opts );\n\nvar args = cli.args();\n// returns [ 'a', 'b', 'c' ]\n```\n\nTo specify command-line argument parser options, such as command-line flag types and aliases, set the `options` option.\n\n```javascript\nvar opts = {\n    'options': {\n        'boolean': [\n            'help',\n            'version'\n        ],\n        'string': [\n            'output'\n        ],\n        'alias': {\n            'help': [\n                'h'\n            ],\n            'version': [\n                'V'\n            ],\n            'output': [\n                'o'\n            ]\n        }\n    },\n    'argv': [\n        '/usr/local/bin/node',\n        'foo.js',\n        '-o=bar.js'\n    ]\n};\n\nvar cli = new CLI( opts );\n\nvar flags = cli.flags();\n/* returns\n    {\n        'h': false,\n        'help': false,\n        'V': false,\n        'version': false,\n        'o': 'bar.js',\n        'output': 'bar.js'\n    }\n*/\n```\n\nBy default, if provided sufficient package meta data (package `name` and `version`), an instance checks whether a newer version of a command-line interface exists in the package registry. If a newer version exists, an instance writes a message to `stdout` indicating that a newer version exists. To disable this check, set the `updates` option to `false`.\n\n```javascript\nvar opts = {\n    'updates': false\n};\n\nvar cli = new CLI( opts );\n// returns <CLI>\n```\n\n* * *\n\n### Prototype Methods\n\n#### CLI.prototype.close( \\[code] )\n\nGracefully exits a command-line interface and the calling process.\n\n```javascript\nvar cli = new CLI();\n\n// Gracefully exit:\ncli.close();\n```\n\nTo specify an exit code, provide a `code` argument.\n\n<!-- run-disable -->\n\n```javascript\nvar cli = new CLI();\n\n// Set the exit code to `1`:\ncli.close( 1 );\n```\n\n#### CLI.prototype.error( error\\[, code] )\n\nPrints an error message to `stderr` and exits a command-line interface and the calling process.\n\n<!-- run-disable -->\n\n```javascript\nvar cli = new CLI();\n\n// ...\n\n// Create a new error object:\nvar err = new Error( 'invalid argument' );\n\n// Exit due to the error:\ncli.error( err );\n```\n\nWhen exiting due to an error, the default exit code is `1`. To specify an alternative exit code, provide a `code` argument.\n\n<!-- run-disable -->\n\n```javascript\nvar cli = new CLI();\n\n// ...\n\n// Create a new error object:\nvar err = new Error( 'invalid argument' );\n\n// Exit due to the error:\ncli.error( err, 2 );\n```\n\n#### CLI.prototype.exit( \\[code] )\n\nForcefully exits a command-line interface and the calling process.\n\n```javascript\nvar cli = new CLI();\n\n// Forcefully exit:\ncli.exit();\n```\n\nTo specify an exit code, provide a `code` argument.\n\n<!-- run-disable -->\n\n```javascript\nvar cli = new CLI();\n\n// Set the exit code to `1`:\ncli.exit( 1 );\n```\n\n* * *\n\n### Instance Methods\n\n#### cli.args()\n\nReturns a list of command-line arguments.\n\n```javascript\nvar cli = new CLI({\n    'argv': [\n        '/usr/local/bin/node',\n        'foo.js',\n        'a',\n        '--b',\n        'c',\n        'd'\n    ]\n});\n\nvar args = cli.args();\n// returns [ 'a', 'd' ]\n```\n\n#### cli.flags()\n\nReturns command-line flags.\n\n```javascript\nvar cli = new CLI({\n    'argv': [\n        '/usr/local/bin/node',\n        'foo.js',\n        'a',\n        '--b',\n        'c',\n        '-def',\n        '--g=h',\n        'i'\n    ]\n});\n\nvar flags = cli.flags();\n// returns { 'b': 'c', 'd': true, 'e': true, 'f': true, 'g': 'h' }\n```\n\n#### cli.help( \\[code] )\n\nPrints help text to `stderr` and then exits the calling process.\n\n```javascript\nvar cli = new CLI({\n    'help': 'Usage: beep [options] <boop>'\n});\n\ncli.help();\n// => Usage: beep [options] <boop>\n```\n\nBy default, the process exits with an exit code equal to `0`. To exit with a different exit code, provide a `code` argument.\n\n#### cli.version()\n\nPrints the command-line interface version to `stderr` and then exits the calling process.\n\n```javascript\nvar cli = new CLI({\n    'version': '1.1.1'\n});\n\ncli.version();\n// => 1.1.1\n```\n\n</section>\n\n<!-- /.usage -->\n\n<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n* * *\n\n<section class=\"notes\">\n\n## Notes\n\n-   When either `--help` or `--version` command-line flag is set, a command-line interface instance prints the respective value and then exits the calling process.\n-   When explicitly setting `options.argv`, the first element is reserved for the absolute pathname of the executable which launched the calling process and the second element is reserved for the file path of the executed JavaScript file.\n\n</section>\n\n<!-- /.notes -->\n\n<!-- Package usage examples. -->\n\n* * *\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- eslint-disable stdlib/require-file-extensions -->\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar join = require( 'path' ).join;\nvar readFileSync = require( '@stdlib/fs-read-file' ).sync;\nvar CLI = require( '@stdlib/cli-ctor' );\nvar main = require( './examples/fixtures/main.js' );\n\n// Load help text:\nvar fopts = {\n    'encoding': 'utf8'\n};\nvar help = readFileSync( join( __dirname, 'examples', 'fixtures', 'usage.txt' ), fopts );\n\n// Set the command-line interface options:\nvar opts = {\n    'pkg': require( './package.json' ),\n    'options': require( './examples/fixtures/opts.json' ),\n    'help': help,\n    'title': true,\n    'updates': true\n};\n\n// Create a new command-line interface:\nvar cli = new CLI( opts );\n\n// Run main:\nmain( 'beep' );\n\n// Close:\ncli.close( 0 );\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"references\">\n\n</section>\n\n<!-- /.references -->\n\n<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->\n\n<section class=\"related\">\n\n</section>\n\n<!-- /.related -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n\n<section class=\"main-repo\" >\n\n* * *\n\n## Notice\n\nThis package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.\n\nFor more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n---\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n\n## Copyright\n\nCopyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].\n\n</section>\n\n<!-- /.stdlib -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"links\">\n\n[npm-image]: http://img.shields.io/npm/v/@stdlib/cli-ctor.svg\n[npm-url]: https://npmjs.org/package/@stdlib/cli-ctor\n\n[test-image]: https://github.com/stdlib-js/cli-ctor/actions/workflows/test.yml/badge.svg?branch=v0.2.1\n[test-url]: https://github.com/stdlib-js/cli-ctor/actions/workflows/test.yml?query=branch:v0.2.1\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/cli-ctor/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/cli-ctor?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/cli-ctor.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/cli-ctor/main\n\n-->\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im\n\n[stdlib]: https://github.com/stdlib-js/stdlib\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/cli-ctor/main/LICENSE\n\n</section>\n\n<!-- /.links -->\n","_attachments":{},"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"license":"Apache-2.0"}