{"_id":"yargs@18.1.0","bugs":{"url":"https://github.com/yargs/yargs/issues"},"dist":{"shasum":"cd7e98c703ef51695bbbf062ed58f28e94291b56","tarball":"http://registry-npm.ywwl.com/yargs/download/yargs-18.1.0.tgz","fileCount":59,"integrity":"sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==","signatures":[{"sig":"MEYCIQDgR/DNNEDjqWVp1A6GwSjTbOlrJEwIZG0syw+nrku5kwIhAKlt8GexRkMgcfV1su92psNstRx7+HmyiTfMoovqGP6e","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICYO80szWlk1GxeWq8nEQPDdhSIjHT7haUcIJnX8g7N8AiEAk9EuAF5iAfm6tOmbgC6pL3PmZcwXxw6A376t2pUhTO8="}],"unpackedSize":235413,"size":48638,"noattachment":false,"key":"/yargs/-/yargs-18.1.0.tgz"},"main":"./index.mjs","name":"yargs","type":"module","module":"./index.mjs","engines":{"node":"^20.19.0 || ^22.12.0 || >=23"},"exports":{".":"./index.mjs","./yargs":"./index.mjs","./browser":{"types":"./browser.d.ts","import":"./browser.mjs"},"./helpers":"./helpers/helpers.mjs","./package.json":"./package.json"},"gitHead":"8878a894111e3fe7c98d84af546c0f34fa017492","license":"MIT","scripts":{"fix":"gts fix && npm run fix:js","test":"c8 mocha --enable-source-maps ./test/*.mjs --require ./test/before.mjs --timeout=24000 --check-leaks","check":"gts lint && npm run check:js","clean":"gts clean","watch":"rimraf build && npm:watch:tsc","fix:js":"eslint . --ext mjs --ext js --fix","compile":"rimraf build && tsc","prepare":"npm run compile","pretest":"npm run compile -- -p tsconfig.test.json","check:js":"eslint . --ext mjs --ext js","coverage":"c8 report --check-coverage","posttest":"npm run check","test:esm":"c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks","watch:tsc":"tsc --watch"},"version":"18.1.0","_npmUser":{"name":"shadowspawn","email":"npm_j@ruru.gen.nz"},"homepage":"https://yargs.js.org/","keywords":["argument","args","option","parser","parsing","cli","command"],"repository":{"url":"git+https://github.com/yargs/yargs.git","type":"git"},"_npmVersion":"11.16.0","description":"yargs the modern, pirate-themed, successor to optimist.","directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"shadowspawn","email":"npm_j@ruru.gen.nz"},{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"}],"_nodeVersion":"24.18.0","contributors":[{"url":"https://github.com/yargs/yargs/graphs/contributors","name":"Yargs Contributors"}],"dependencies":{"y18n":"^5.0.5","cliui":"^9.0.1","escalade":"^3.1.1","string-width":"^8.2.1","yargs-parser":"^22.0.0","get-caller-file":"^2.0.5"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^11.0.0","cpr":"^3.0.1","gts":"^5.3.1","chai":"^6.2.2","chalk":"^5.6.2","mocha":"^11.7.6","which":"^2.0.2","eslint":"^8.57.1","rimraf":"^3.0.2","hashish":"0.0.4","cross-env":"^10.0.0","typescript":"^5.9.3","@types/chai":"^5.2.3","@types/node":"^20.0.0","cross-spawn":"^7.0.6","@types/mocha":"^9.0.0","yargs-test-extends":"^1.0.1","@babel/eslint-parser":"^7.26.10","browserslist-generator":"^3.0.0","eslint-plugin-prettier":"^5.1.2","@babel/preset-typescript":"^7.26.0","@typescript-eslint/eslint-plugin":"^8.26.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yargs_18.1.0_1785038868581_0.9838302048671772"},"readme":"<p align=\"center\">\n  <img width=\"250\" src=\"https://raw.githubusercontent.com/yargs/yargs/main/yargs-logo.png\">\n</p>\n<h1 align=\"center\"> Yargs </h1>\n<p align=\"center\">\n  <b >Yargs be a node.js library fer hearties tryin' ter parse optstrings</b>\n</p>\n\n<br>\n\n![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg)\n[![NPM version][npm-image]][npm-url]\n[![js-standard-style][standard-image]][standard-url]\n[![Coverage][coverage-image]][coverage-url]\n[![Conventional Commits][conventional-commits-image]][conventional-commits-url]\n\n## Description\nYargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.\n\nIt gives you:\n\n* commands and (grouped) options (`my-program.js serve --port=5000`).\n* a dynamically generated help menu based on your arguments:\n\n```\nmocha [spec..]\n\nRun tests with Mocha\n\nCommands\n  mocha inspect [spec..]  Run tests with Mocha                         [default]\n  mocha init <path>       create a client-side Mocha setup at <path>\n\nRules & Behavior\n  --allow-uncaught           Allow uncaught errors to propagate        [boolean]\n  --async-only, -A           Require all tests to use a callback (async) or\n                             return a Promise                          [boolean]\n```\n\n* generate completion scripts for Bash and Zsh for your command\n* and [tons more](/docs/api.md).\n\n## Installation\n\nStable version:\n```bash\nnpm i yargs\n```\n\nBleeding edge version with the most recent features:\n```bash\nnpm i yargs@next\n```\n\n## Usage\n\n### Simple Example\n\n```javascript\n#!/usr/bin/env node\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nconst argv = yargs(hideBin(process.argv)).parse()\n\nif (argv.ships > 3 && argv.distance < 53.5) {\n  console.log('Plunder more riffiwobbles!')\n} else {\n  console.log('Retreat from the xupptumblers!')\n}\n```\n\n```bash\n$ ./plunder.js --ships=4 --distance=22\nPlunder more riffiwobbles!\n\n$ ./plunder.js --ships 12 --distance 98.7\nRetreat from the xupptumblers!\n```\n\n> Note: `hideBin` is a shorthand for `process.argv.slice(2)`. It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690).\n\n### Complex Example\n\n```javascript\n#!/usr/bin/env node\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\n\nyargs(hideBin(process.argv))\n  .command('serve [port]', 'start the server', (yargs) => {\n    return yargs\n      .positional('port', {\n        describe: 'port to bind on',\n        default: 5000\n      })\n  }, (argv) => {\n    if (argv.verbose) console.info(`start server on :${argv.port}`)\n    serve(argv.port)\n  })\n  .option('verbose', {\n    alias: 'v',\n    type: 'boolean',\n    description: 'Run with verbose logging'\n  })\n  .parse()\n```\n\nRun the example above with `--help` to see the help for the application.\n\n## Supported Platforms\n\n### TypeScript\n\nyargs has type definitions at [@types/yargs][type-definitions].\n\n```\nnpm i @types/yargs --save-dev\n```\n\nSee usage examples in [docs](/docs/typescript.md).\n\n### Deno\n\nAs of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):\n\n```typescript\nimport yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts'\nimport { Arguments } from 'https://deno.land/x/yargs@v17.7.2-deno/deno-types.ts'\n\nyargs(Deno.args)\n  .command('download <files...>', 'download a list of files', (yargs: any) => {\n    return yargs.positional('files', {\n      describe: 'a list of files to do something with'\n    })\n  }, (argv: Arguments) => {\n    console.info(argv)\n  })\n  .strictCommands()\n  .demandCommand(1)\n  .parse()\n```\n\n> Note: If you use version tags in url then you also have to add `-deno` flag on the end, like `@17.7.2-deno`\n\n### Usage in Browser\n\nSee examples of using yargs in the browser in [docs](/docs/browser.md).\n\n## Documentation\n\n### Table of Contents\n\n* [Yargs' API](/docs/api.md)\n* [Examples](/docs/examples.md)\n* [Parsing Tricks](/docs/tricks.md)\n  * [Stop the Parser](/docs/tricks.md#stop)\n  * [Negating Boolean Arguments](/docs/tricks.md#negate)\n  * [Numbers](/docs/tricks.md#numbers)\n  * [Arrays](/docs/tricks.md#arrays)\n  * [Objects](/docs/tricks.md#objects)\n  * [Quotes](/docs/tricks.md#quotes)\n* [Advanced Topics](/docs/advanced.md)\n  * [Composing Your App Using Commands](/docs/advanced.md#commands)\n  * [Building Configurable CLI Apps](/docs/advanced.md#configuration)\n  * [Customizing Yargs' Parser](/docs/advanced.md#customizing)\n* [Contributing](/contributing.md)\n\n## Supported Node.js Versions\n\nLibraries in this ecosystem make a best effort to track\n[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a\npost on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).\n\n[npm-url]: https://www.npmjs.com/package/yargs\n[npm-image]: https://img.shields.io/npm/v/yargs.svg\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n[standard-url]: http://standardjs.com/\n[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg\n[conventional-commits-url]: https://conventionalcommits.org/\n[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs\n[coverage-image]: https://img.shields.io/nycrc/yargs/yargs\n[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc\n","publish_time":1785038868666,"_cnpm_publish_time":1785038868666,"dist-tags":{"browser":"18.0.0-browser.2","latest":"18.2.0","latest-11":"11.1.1","latest-13":"13.3.2","latest-14":"14.2.3","latest-16":"16.2.2","latest-17":"17.7.3","latest-7":"7.1.2","next":"18.0.0-candidate.7","next-14":"14.2.1","next-15":"15.5.0-candidate.0","next-16":"16.2.2-candidate.0","next-17":"17.7.3-candidate.0"}}