cac
npmv7.0.0Simple yet powerful framework for building command-line apps.
Safe to adopt
Yes — cac scores well across adoption, maintenance, weight, supply chain, and licensing. 44M downloads per week and 9 known dependents. Last published 194 days ago. 2 releases in the last 2 years.
- AAdoption: grade A, Excellent.
44M downloads per week and 9 known dependents.
- BMaintenance: grade B, Good.
Last published 194 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 40 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — 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 cac 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
- Module format
- ESM only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the cac README.
// examples/basic-usage.js
import cac from 'cac'
const cli = cac()
cli.option('--type <type>', 'Choose a project type', {
default: 'node',
})
const parsed = cli.parse()
console.log(JSON.stringify(parsed, null, 2))Dependencies
Declared by cac v7.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (19)
Used by
Popular packages that depend on cac.
Native-ESM powered web dev build tool
Next generation testing framework powered by Vite
Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.
Vite DevTools
Framework for building one portable devtool integration that runs in any viewer.
Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.
Devframe plugin for browsing, filtering, and dismissing the hub message feed.
Devframe plugin providing terminal panels for streamed output and interactive PTY shells.
DevTools for the Oxc toolchain
Relationship graph
Dependencies (left) and dependents (right) of cac.
Frequently installed together
Native-ESM powered web dev build tool
Framework for building one portable devtool integration that runs in any viewer.
Minimal H(TTP) framework built for high performance and portability.
Structured diagnostic code library
Universal filesystem path utils
The progressive JavaScript framework for building modern web UI.
Hub layer that orchestrates devframe docks, terminals, messages, and commands on any host.
Next generation testing framework powered by Vite
Let’s get serious about color
Get an available TCP port to listen
TypeScript definitions for node
A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.
Release history
2 releases in the last two years, typically about 2 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 7.0.0latest | 6 months ago | 40 KB | MIT |
| 7.0.0-beta.1 | 6 months ago | 39 KB | MIT |
| 6.7.14 | 4 years ago | 80 KB | MIT |
| 6.7.13 | 4 years ago | 80 KB | MIT |
| 6.7.12 | 4 years ago | 80 KB | MIT |
| 6.7.11 | 4 years ago | 80 KB | MIT |
| 6.7.10 | 4 years ago | 80 KB | MIT |
| 6.7.9 | 4 years ago | 80 KB | MIT |
| 6.7.8 | 4 years ago | 80 KB | MIT |
| 6.7.7 | 4 years ago | 79 KB | MIT |
| 6.7.6 | 4 years ago | 79 KB | MIT |
| 6.7.5 | 4 years ago | 79 KB | MIT |
| 6.7.4 | 4 years ago | 79 KB | MIT |
| 6.7.3 | 5 years ago | 79 KB | MIT |
| 6.7.2 | 5 years ago | 79 KB | MIT |
Overview
cac is an npm package that simple yet powerful framework for building command-line apps. It is extremely widely used, with about 44M downloads per week and 9 known dependents in the graph. The latest version is 7.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need simple yet powerful framework for building command-line apps 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 (44M weekly downloads).
- Clear open-source license (MIT).
Cons
- Large dependency tree (19 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 cac?
Yes — cac scores well across adoption, maintenance, weight, supply chain, and licensing. 44M downloads per week and 9 known dependents. Last published 194 days ago. 2 releases in the last 2 years.
How do I install cac?
Run `npm install cac` to add cac to your npm project.
What license is cac released under?
cac is distributed under the MIT license.
How popular is cac?
cac has approximately 43,976,442 downloads per week and 9 known dependent packages.
Is cac still maintained?
The most recent release of cac (v7.0.0) was published 6 months ago.
Does cac run install scripts?
No. cac does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.