yargs-parser
npmv22.0.0the mighty option parser used by yargs
Adopt with care
yargs-parser is usable, with caveats. Last published 471 days ago.
- AAdoption: grade A, Excellent.
178.8M downloads per week and 2 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 471 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 84 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
ISC — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding yargs-parser to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^20.19.0 || ^22.12.0 || >=23
- Module format
- ESM + CommonJS
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the yargs-parser README.
const argv = require('yargs-parser')(process.argv.slice(2))
console.log(argv)yargs-parser vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
Dependencies
Declared by yargs-parser v22.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (18)
Used by
Popular packages that depend on yargs-parser.
Relationship graph
Dependencies (left) and dependents (right) of yargs-parser.
Frequently installed together
Like which(1) unix command. Find the first instance of an executable in the PATH.
easily create complex multi-column command-line-interfaces
An AST-based pattern checker for JavaScript.
A tiny (183B to 210B) and fast utility to ascend parent directories
the bare-bones internationalization library used by yargs
TypeScript definitions for chai
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
TypeScript definitions for node
Cross platform child_process#spawn and child_process#spawnSync
Get the visual width of a string - the number of columns required to display it
[](https://travis-ci.org/stefanpenner/get-caller-file) [](https://ci.a
Babel preset for TypeScript.
Release history
1 release in the last two years, typically about 13 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 22.0.0latest | 1 year ago | 84 KB | ISC |
| 21.1.1 | 4 years ago | 125 KB | ISC |
| 21.1.0 | 4 years ago | 131 KB | ISC |
| 21.0.1 | 4 years ago | 123 KB | ISC |
| 21.0.0 | 4 years ago | 123 KB | ISC |
| 20.2.9 | 5 years ago | 122 KB | ISC |
| 15.0.3 | 5 years ago | 61 KB | ISC |
| 15.0.2 | 5 years ago | 61 KB | ISC |
| 20.2.7 | 5 years ago | 119 KB | ISC |
| 5.0.1 | 5 years ago | 38 KB | ISC |
| 20.2.6 | 5 years ago | 118 KB | ISC |
| 20.2.5 | 5 years ago | 118 KB | ISC |
| 20.2.4 | 5 years ago | 117 KB | ISC |
| 20.2.3 | 5 years ago | 117 KB | ISC |
| 20.2.2 | 5 years ago | 116 KB | ISC |
Overview
yargs-parser is an npm package that the mighty option parser used by yargs. It is extremely widely used, with about 178.8M downloads per week and 2 known dependents in the graph. The latest version is 22.0.0, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need the mighty option parser used by yargs and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (178.8M weekly downloads).
- Clear open-source license (ISC).
Cons
- Large dependency tree (18 direct dependencies) increases install size and audit surface.
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use yargs-parser?
yargs-parser is usable, with caveats. Last published 471 days ago.
How do I install yargs-parser?
Run `npm install yargs-parser` to add yargs-parser to your npm project.
What license is yargs-parser released under?
yargs-parser is distributed under the ISC license.
How popular is yargs-parser?
yargs-parser has approximately 178,824,999 downloads per week and 2 known dependent packages.
Is yargs-parser still maintained?
The most recent release of yargs-parser (v22.0.0) was published 1 year ago.
Does yargs-parser run install scripts?
No. yargs-parser does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.