# Commander.js: 8.6 out of 10

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

Commander.js is the most widely used argument parser and subcommand framework for Node.js. It has no dependencies and ships its own types. It remains the safe default for parsing a command line today, though it does not handle prompts or terminal UIs. Version 15 is ESM-only and needs Node 22.12 or newer.

**Best for:** Anyone building a Node.js CLI with options and subcommands who wants a small, stable, well-documented parser with no dependencies.

## Scores

- **Overall: 8.6** (likely 7.5 to 9.3)
  - Claude Opus 5.5 (8.5): Commander is the default argument parser for Node CLIs. It is mature, has no dependencies, is actively maintained and is trusted across the ecosystem. It falls short of a 9 for the whole category because it does not cover prompts or TUIs. yargs, citty and CAC also beat it on some points: built-in features, type inference and growth. The ESM-only v15 adds some upgrade friction.
  - GPT-6.2 Sol (8.6): Commander is a strong first choice for a new Node.js CLI built around flags, arguments, and subcommands. Its clear errors, documented API, and active maintenance carry more weight than its slower relative download growth. Citty has an edge when inferred types drive the choice, and oclif has an edge when users need to install plugins. The Node.js version floor and the amount of adoption still on older majors leave some uncertainty about how broadly to recommend v15.
- **Needed by many: 5.6** (likely 4.5 to 6.6)
  - Claude Opus 5.5 (6.5): Many JS/TS developers write a CLI or script at some point, and Commander serves most of that need. It covers only the argument-parsing part of the category, not prompts or TUIs. It runs on Node, Bun and Deno.
  - GPT-6.2 Sol (4.6): Commander serves developers building scripts, scaffolding tools, and multi-command CLIs. Node.js is widely used, but small scripts can use its built-in parser, and interactive tools need additional libraries. Runtime surveys show how many developers can use Commander, while the share who build a CLI is harder to estimate.
- **Helps a lot: 8.3** (likely 7.3 to 9.1)
  - Claude Opus 5.5 (8.0): It is a mature, correct and well-documented parser with subcommands, help groups, choices, env options and good error messages. Its limits are weaker type inference than schema-first tools, no shell completions and less built-in validation than yargs. For most CLIs it is the clearest API available.
  - GPT-6.2 Sol (8.6): Commander 15.1.0 handles nested commands, option conflicts, environment-backed flags, and useful errors with a well-documented API. The examples give coding agents a clear pattern for standard handlers, while inferred option and handler types require separate typings. One small benchmark found Commander 15.0 faster than citty at defining and parsing a simple command, with end-to-end startup performance still uncertain.
- **Holds up over time: 8.4** (likely 7.3 to 9.1)
  - Claude Opus 5.5 (8.5): Maintenance is steady: 86 commits and 4 releases in the last year, only 7 open issues and no open PRs. There is a written support policy for old majors. Breaking changes are announced with prerelease builds and migration notes. Risks: volunteers maintain it without clear funding, and the move to ESM-only adds friction for some users.
  - GPT-6.2 Sol (8.2): The project logged 86 commits in a year, and multiple maintainers reviewed a Unicode parsing fix that shipped in November. Commander 14 gets security fixes through May 2027, giving teams time to absorb the ESM move and higher Node.js floor in v15. Sustained funding and the number of maintainers able to publish to npm remain unclear.
- **Used widely: 9.0** (likely 8.2 to 9.7)
  - Claude Opus 5.5 (9.5): About 3.0B downloads in 4 weeks and over 1M dependent repos put it at the top of the category. Most downloads are transitive. Its year-over-year ratio of about 3.1 is below the 4.1 median, so it is slowly losing share to newer tools like citty, CAC and Clack, but from a very large base.
  - GPT-6.2 Sol (8.4): Ecosyste.ms found 1.08 million dependent repositories and about 75,000 dependent packages, putting Commander well ahead of CAC and citty on recorded use and behind yargs on repository count. Downloads grew 3.14× year over year, below the 4.1× catalog baseline and behind both CAC and citty. Automated installs and indirect use through tools such as Terser make the nearly 3 billion monthly downloads a poor measure of how often teams choose Commander today.
- **Vouched for: 8.0** (likely 7.0 to 9.0)
  - Claude Opus 5.5 (8.0): Independent 2026 comparison guides recommend it as the default for most CLIs. Many widely used tools build on it. It has no survey coverage and almost no recent discussion on HN or Bluesky, which keeps the score below the top.
  - GPT-6.2 Sol (8.0): Webpack CLI uses Commander to customize its help output, and Vercel's create-next-app uses it to define and parse its flags. An independent test also confirmed that Commander 15.0 loads from both ESM and CommonJS on Node 22. The two downstream tools use older Commander majors, and the developer reports provide too little coverage to estimate v15 satisfaction.
- **Safe: 8.7** (likely 7.7 to 9.5)
  - Claude Opus 5.5 (9.0): It has zero dependencies, no known advisories, an MIT licence and a Scorecard of 7.7 with strong workflow, pinning and SAST checks. The weak checks are branch protection, fuzzing and CII best practices.
  - GPT-6.2 Sol (8.4): Commander has zero runtime dependencies, a permissive MIT license, and zero advisories in OSV. OpenSSF scored code review and workflow controls well, with zeros for branch protection and fuzzing. The available evidence leaves npm publisher access, package provenance, and release signing uncertain.

## Good

- It has no runtime dependencies, so a published CLI stays small and carries few supply-chain risks.
- Its API is simple and well documented, with subcommands, help generation, env-var options, choices and mandatory options, and AI agents write it correctly most of the time.
- It is actively maintained, with a written release policy that gives old major versions 12 months of security fixes.
- It has a very large user base (over a million dependent repos), so examples and answers are easy to find.

## Bad

- It only parses arguments. Prompts and interactive terminal UIs need another library, such as Clack, Inquirer or Ink.
- Method chaining limits end-to-end type inference. Strong typing needs the separate @commander-js/extra-typings package.
- v15 is ESM-only and needs Node 22.12 or newer, which breaks some CommonJS test setups and projects still on Node 20.
- It has fewer built-in features than yargs: no shell completions, no middleware, and only light validation.

## The numbers

- Downloads, 4 weeks: 3B
- In a year: ×3.1
- GitHub stars: 28k
- Commits, 12 months: 86
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/tj/commander.js
- npm: https://www.npmjs.com/package/commander

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.
