# CAC: 6.6 out of 10

Reasonable, with limits. 7th of 10 in [CLI frameworks and prompts](https://elestia.ai/opensource/cli/index.md).

CAC is a small command-line argument parser with no dependencies. Vite, Vitest and tsdown use it. It is a light, proven choice for simple TypeScript CLIs. However, version 7 is ESM-only, its option types are loosely typed, and several parsing bugs have stayed open for years. For most new tools, Commander or citty is the stronger pick.

**Best for:** Authors of small Node.js or Deno build tools who want a tiny, dependency-free parser with sub-commands and dotted options, like Vite's.

## Scores

- **Overall: 6.6** (likely 5.6 to 7.6)
  - Claude Opus 5.5 (6.0): CAC is a sound, tiny parser with strong real-world use through Vite, and it is maintained again in 2026. Commander offers more features and a larger community, and citty offers better TypeScript inference. Long-open parsing bugs and an ESM-only break also keep it from being a strong default.
  - GPT-6.2 Sol (7.1): CAC is a strong pick for a small modern CLI that benefits from dotted flags, generated help, and few moving parts. Commander.js is the stronger general-purpose choice for nested command trees and finer control over parsing. Recent releases and continued use by established tools support choosing CAC today, while the long release gap and reliance on one visible release signer limit confidence over two years.
- **Needed by many: 4.7** (likely 3.7 to 5.8)
  - Claude Opus 5.5 (5.0): Many developers write a CLI or a script now and then, but few need a framework for it in most projects. CAC covers only argument parsing, not prompts or terminal UI, so it serves part of the category's job.
  - GPT-6.2 Sol (4.4): CAC serves developers writing their own terminal commands, from internal scripts to published tools. It covers argument parsing and help, while interactive prompts and terminal rendering require separate tools. The Node.js and Deno options broaden its fit, but the share of developers who author CLIs is hard to estimate.
- **Helps a lot: 6.5** (likely 5.5 to 7.5)
  - Claude Opus 5.5 (6.0): The parser is compact and capable: it handles sub-commands, dotted options, negated flags, and help and version output. It is written in TypeScript. But option types are loose, and type-coercion bugs and missing features have stayed open for years, including number parsing of quoted strings, multi-word commands and completion. There is no documentation website. Commander is more complete, and citty has better type inference.
  - GPT-6.2 Sol (7.0): CAC handles aliases, variadic arguments, dotted flags, and generated help with a small API and clear examples. Numeric coercion and flat command matching limit what it can express reliably. The tagged 7.1.1 source shows loose types at the parser boundary, and independent tests cover an earlier v7 build.
- **Holds up over time: 6.6** (likely 5.2 to 7.6)
  - Claude Opus 5.5 (6.5): Work picked up in 2026: version 7.0 came out in February, followed by three fixes through November, and there were 53 commits last year. Vite and Vitest depend on it, which gives a reason to keep it alive. But maintenance rests on a small group with no visible funding, and many old issues stay open. The ESM-only break in version 7 shows a willingness to drop compatibility.
  - GPT-6.2 Sol (6.6): CAC resumed releases after a long gap and recorded 53 commits and five GitHub releases in the past year. Recent releases include community fixes, while some parser issues and proposed fixes have stayed open for months or years. Version 7 changed the Node.js minimum, module format, and event API. Recent tags share one signer and the package names one maintainer, which leaves uncertainty about who can take over releases.
- **Used widely: 5.9** (likely 4.8 to 6.9)
  - Claude Opus 5.5 (6.0): The download count of 275M per 4 weeks is mostly installs pulled in by Vite and Vitest, not direct choices. The year-on-year ratio of 4.18 matches the 4.1 median, so CAC is holding ground, not gaining it. About 64k dependent repos is far below Commander and yargs, but well above citty and Clipanion.
  - GPT-6.2 Sol (5.7): The index found about 64,000 dependent repositories, well ahead of citty and far behind Commander.js and yargs. Downloads rose from 65.9 million to 275.6 million in the comparable four-week periods, or 4.18× against the catalog median of 4.1×. That is a slight gain by the catalog measure, while the npm version breakdown still skews toward 6.7.14. Automated and transitive installs make the pace of new direct adoption hard to estimate.
- **Vouched for: 6.5** (likely 5.2 to 7.5)
  - Claude Opus 5.5 (6.0): Vite, Vitest and tsdown run it at very large scale, which is strong practical proof. Beyond that, there are no survey results and no independent benchmarks. Third-party comparisons mention it only briefly as a simple option.
  - GPT-6.2 Sol (7.0): Vite and Vitest use CAC in their shipped CLIs, and UnoCSS CLI declares it as a dependency. A separate downstream migration trial found that it handled ordinary commands well and fell short when exact argument spelling mattered. The State of JavaScript survey gives context for the downstream tools, while direct satisfaction and current comparative performance evidence for CAC are sparse.
- **Safe: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (7.5): It has no dependencies, an MIT licence and no OSV advisories. Two prototype-pollution bugs were fixed within weeks in versions 7.0.1 and 7.1.1. The OpenSSF Scorecard is weak at 4.8: there is no branch protection, no code review, no security policy and no pinned dependencies.
  - GPT-6.2 Sol (6.8): CAC has an MIT license and zero runtime dependencies. The release notes document prototype pollution fixes in 7.0.1 and 7.1.1 that the OSV snapshot misses. The latest tag is signed, and publishing runs through GitHub Actions using a workflow referenced by a mutable branch. Weak code review and branch protection checks and the lack of a security policy weigh against the small dependency footprint.

## Good

- It has no runtime dependencies and ships as one small package.
- Vite, Vitest and tsdown use it, so its core parsing is well exercised.
- Its API is short: commands, options, help and version take a few lines each.
- Version 7 adds browser and Deno support and is also published on JSR.

## Bad

- Option values are only loosely typed, unlike citty's typed definitions.
- Old parsing bugs are still open, such as quoted strings becoming numbers and multi-word commands not matching.
- Version 7 dropped the CommonJS build and support for Node.js below 20.19, and renamed cli.on() to addEventListener().
- It only parses arguments: it has no prompts or terminal UI, and no plugin system or shell completion.

## The numbers

- Downloads, 4 weeks: 276M
- In a year: ×4.2
- GitHub stars: 3.2k
- Commits, 12 months: 53
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/cacjs/cac
- npm: https://www.npmjs.com/package/cac

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.
