Elestia Open Source Ratings
7.0

yargs

A strong pick. 6th of 10 CLI frameworks and prompts.

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.

WebsiteGitHubnpm

Scores

Overall7.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.0, likely 5.0 to 7.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, likely 6.8 to 8.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 many5.3

How many developers need a tool for this job?

Claude Opus 5.5: 6.0, likely 5.0 to 7.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.

  • category scope: Argument parsing is common in tooling but not needed in most app code
  • dependents.packages: 42,638 packages depend on it, so CLI parsing is a widespread need

GPT-6.2 Sol: 4.6, likely 3.5 to 5.8

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 lot7.5

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.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, likely 7.0 to 9.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 time6.7

Will it still be a good choice in two years?

Claude Opus 5.5: 6.0, likely 5.0 to 7.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, likely 6.2 to 8.5

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 widely8.0

How many use it, and is that growing?

Claude Opus 5.5: 8.0, likely 7.0 to 9.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.

  • npm downloadsLast4Weeks: 1.51B now vs 521M a year ago, a ratio of 2.9 against the 4.1 median
  • dependents.repos: 4.89M repos, largely through transitive installs
  • peers Commander downloadsLast4Weeks: Commander has about twice the downloads

GPT-6.2 Sol: 8.0, likely 6.8 to 9.1

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.

  • dependents repos, dependents packages, peers dependentRepos: yargs leads the supplied repository counts, with partial ecosystem coverage.
  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Downloads rose from 521 million to 1.51 billion, below the catalog growth baseline.
  • github stars, bluesky posts, hackerNews stories, peers: 11,509 stars show accumulated interest, with sparse recent discussion in the sampled channels.
  • github.com/jestjs/jest/blob/main/packages/jest-cli/package.json: Jest CLI still pulls in the older yargs 17 line.
Vouched for7.6

Who stands behind it being good?

Claude Opus 5.5: 7.0, likely 6.0 to 8.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, likely 7.1 to 9.0

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.

Safe7.9

How safe is it to depend on?

Claude Opus 5.5: 8.0, likely 7.0 to 9.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.

  • advisories.total: 0 known advisories
  • scorecard.score: 7.3, with Code-Review at 4 and SAST at 0
  • github.com/yargs/yargs/releases: Prototype pollution fix in 18.1.0
  • npm dependencies: 6 runtime dependencies

GPT-6.2 Sol: 7.7, likely 6.6 to 8.8

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

npm downloads, 4 weeks
1.5B ×2.9 in a year
GitHub stars
12k
Commits, 12 months
35
npm version
18.2.0 Sept 2026
Versions, 12 months
4
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
7.3 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (yargs/yargs), npm (yargs), OSV and the OpenSSF Scorecard.

CLI frameworks and prompts

  1. 8.6Commander.js
  2. 8.1Clack
  3. 8.1Ink
  4. 7.8Inquirer.js
  5. 7.2oclif
  6. 7.0yargs
  7. 6.6CAC
  8. 6.5citty
  9. 5.7meow
  10. 4.3Clipanion
Compare all 10 on six scores