# yargs: 7.0 out of 10

A strong pick. 6th of 10 in [CLI frameworks and prompts](https://elestia.ai/opensource/cli/index.md).

yargs is a mature, feature-rich Node.js argument parser. It has built-in validation, help, i18n, middleware and shell completion. It still works well and is maintained, but releases are slow and its TypeScript inference is weaker than Commander's. Its share of downloads is also growing more slowly than the market, so it is a reasonable pick but no longer the default.

**Best for:** Teams building flag-heavy or internal Node CLIs that want built-in validation, coercion, middleware and shell completion out of the box.

## Scores

- **Overall: 7.0** (likely 5.9 to 8.0)
  - Claude Opus 5.5 (6.0): yargs is solid, safe and feature-rich, and the right tool when you need built-in validation and shell completion. For most new TypeScript CLIs, Commander is lighter, better typed and more actively developed, and citty or CAC suit minimal tools. Slow development and a shrinking relative share keep it below the top.
  - GPT-6.2 Sol (7.9): yargs is a strong pick when a modern Node.js CLI needs substantial argument parsing, layered configuration, and shell completion. Commander.js is a simpler default for ordinary command trees, with bundled types and lower startup overhead in the available comparison. Current use in Angular CLI supports choosing yargs for demanding tools, while slower relative adoption and v18 migration friction temper the recommendation.
- **Needed by many: 5.3** (likely 4.3 to 6.4)
  - Claude Opus 5.5 (6.0): Many JS/TS developers write CLIs or scripts that need argument parsing, but most app work does not. yargs covers only the parsing part of the category, not prompts or terminal UI.
  - GPT-6.2 Sol (4.6): Argument parsing and generated help are useful across developer tools, automation scripts, and internal CLIs. yargs mainly serves projects that build a CLI, and companion libraries cover prompts and richer terminal interfaces. The developer survey establishes that Node.js is widespread, while demand for building CLIs remains harder to measure.
- **Helps a lot: 7.5** (likely 6.5 to 8.5)
  - Claude Opus 5.5 (7.0): It is the most feature-complete classic parser, with validation, middleware, commandDir, completion and i18n. Clear limits remain: TypeScript inference is weak, the API is verbose for simple commands, and parsing is permissive unless you turn on strict mode. Independent comparisons rate it best for complex flag sets, but they prefer Commander for typed multi-command tools.
  - GPT-6.2 Sol (8.0): Version 18.2 handles nested commands, layered configuration, and localized help, and adds fish completions. The API reference includes examples for developers and coding agents, but TypeScript users report gaps in command-specific inference. A competing library's benchmark measured slower startup than Commander.js and CAC on one workload. That single workload and the limited evidence on agent-generated code leave room around the score.
- **Holds up over time: 6.7** (likely 5.6 to 7.8)
  - Claude Opus 5.5 (6.0): It is still maintained: four releases in the last year, the latest in September 2026, and only 3 open pull requests. But it had 35 commits in a year, far fewer than Commander or Clack, and it relies on a small volunteer core. The v18 ESM and singleton changes broke existing code, and its relative download share is shrinking.
  - GPT-6.2 Sol (7.4): Four releases and 35 commits in the past year show ongoing maintenance at a slower pace than Commander.js. The project published a release policy and received a HeroDevs donation in 2026. Maintainers patched older branches for a Node.js compatibility break, while a newer config regression remains open. Funding continuity and the number of people who can approve releases are unclear.
- **Used widely: 8.0** (likely 6.9 to 9.1)
  - Claude Opus 5.5 (8.0): 1.5 billion downloads in 4 weeks and about 4.9 million dependent repos are huge, but much of that comes in through Jest, Mocha and other tools. Its year-over-year ratio of 2.9 is below the 4.1 median, so it is losing ground. Fewer new projects choose it directly than Commander.
  - GPT-6.2 Sol (8.0): The collector found 4.89 million dependent repositories and 42,638 dependent npm packages, indicating substantial installed reach. Downstream tools such as Jest bring yargs into projects indirectly, and automated installs inflate the download total. Downloads grew 2.89× year over year, below the 4.1× catalog median, Commander.js at 3.14×, and citty at 6.2×. That points to declining relative share, while direct choices for new projects remain hard to count.
- **Vouched for: 7.6** (likely 6.6 to 8.5)
  - Claude Opus 5.5 (7.0): Major tools have run it in production for years, including Jest, Mocha, Angular CLI and Nx. Independent 2026 comparisons still recommend it for complex CLIs. Developer surveys give no current satisfaction data, and community attention is almost nil (no HN stories, 1 Bluesky post).
  - GPT-6.2 Sol (8.2): Angular CLI and Google Chrome's Lighthouse both depend on yargs 18.2 for their shipped tooling. Jest supplies further evidence of real-world use on the older v17 line. These are independent examples of adoption, while direct satisfaction data is sparse and the available performance comparison covers one workload.
- **Safe: 7.9** (likely 6.8 to 8.9)
  - Claude Opus 5.5 (8.0): OSV lists no advisories, the licence is MIT, and the Scorecard is 7.3 with strong workflow and token checks. A local prototype-pollution bug in apply-extends was fixed in 18.1.0. Its six dependencies come mostly from the yargs org itself. Weak spots are code review (4) and the lack of SAST and fuzzing.
  - GPT-6.2 Sol (7.7): yargs has an MIT license, six direct runtime dependencies, and a GitHub Actions workflow configured for staged npm publishing with provenance. The advisory feed lists zero entries for yargs, and the project documented a local prototype-pollution fix in 18.1. OpenSSF reports strong workflow permissions and a security policy, alongside a 4 out of 10 for code review and zeros for fuzzing and static analysis. Release approval access remains unclear.

## Good

- Built-in validation, type coercion, choices, implies/conflicts and strict mode, with no extra code needed.
- Generates shell completion for bash, zsh and fish (fish support added in 18.2.0).
- Help output is auto-generated and localized in many languages.
- Used by Jest, Mocha, Angular CLI and Nx, so its edge cases are well tested.

## Bad

- TypeScript inference is weaker than Commander's: types come from @types/yargs and often need casts or `as const`.
- Has about six dependencies and a larger install footprint than zero-dependency Commander or CAC.
- Version 18 made it ESM-first, removed the singleton API and raised the minimum Node version, so upgrades need code changes.
- Development is slow (35 commits, 4 releases in a year) and depends on a small group of maintainers.

## The numbers

- Downloads, 4 weeks: 1.5B
- In a year: ×2.9
- GitHub stars: 12k
- Commits, 12 months: 35
- Last npm release: Sept 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/yargs/yargs
- npm: https://www.npmjs.com/package/yargs

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
