citty
Reasonable, with limits. 8th of 10 CLI frameworks and prompts.
citty is UnJS's small, zero-dependency, TypeScript-first builder for command-line argument parsing and subcommands. The Nuxt CLI and other UnJS tools use it. It is a sound pick for simple to moderate TypeScript CLIs. It is still pre-1.0 (v0.2.2), has a backlog of open issues and PRs, and lacks shell completions and prompts. Commander remains the safer general default.
Best for: TypeScript developers building small to mid-sized ESM CLIs who want typed args and lazy subcommands without dependencies, especially in the UnJS or Nuxt ecosystem.
Scores
Overall6.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a clean, typed, dependency-free argument parser and a reasonable choice for UnJS-style TypeScript CLIs. It is still 0.x, misses completions and prompts, and has a growing PR backlog. Commander does the same job more completely with a longer record, and CAC is a similar lightweight peer with more direct use.
- peers Commander.js: Far wider adoption and more frequent releases
- peers CAC: Similar lightweight approach with 64k dependent repos
- github.com/unjs/citty/issues: Long-open bugs and feature requests
- pkgpulse.com/guides/citty-vs-caporal-vs-vorpal-modern-cli-frameworks-nodejs-2026: Recommended for simple to moderate TypeScript CLIs
GPT-6.2 Sol: 7.0, likely 5.9 to 8.0
Citty is a good choice for a small TypeScript CLI when inferred types, lazy commands, and zero runtime dependencies matter. Commander.js is a stronger general default for complex option rules, and Yargs is a better fit when built-in shell completion matters. The release gap and open dispatch and typing issues leave some uncertainty about how quickly the 0.2 line will improve.
- raw.githubusercontent.com/unjs/citty/v0.2.2/README.md: The released API covers the core needs of a small CLI.
- github.com/tj/commander.js: Shows broader built-in option rules.
- github.com/yargs/yargs: Shows built-in shell completion.
- github.com/unjs/citty/issues: Tracks argument and routing issues that affect the current release.
- npm latestPublishedAt, peers latestPublishedAt: Citty last shipped in April, while Commander.js and Yargs shipped later in 2026.
Needed by many5.1
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 a CLI or script at some point, so argument parsing is a common need. citty covers only the argument and subcommand part of the category, not prompts or terminal UI. It is also ESM-only and aimed at Node-style runtimes, which narrows it a little.
- pkgpulse.com/guides/citty-vs-caporal-vs-vorpal-modern-cli-frameworks-nodejs-2026: No built-in prompts or REPL; meant to be paired with @clack/prompts
- github.com/unjs/citty/releases: The dist is ESM-only since v0.2.0
GPT-6.2 Sol: 4.1, likely 2.9 to 5.3
Citty fits developers building command-line tools, scaffolding, and internal automation. It works independently of any application framework and covers argument parsing, command dispatch, and help. The State of JavaScript survey gives context on developer tooling but does not measure how many respondents build CLIs.
- 2025.stateofjs.com/en-US/usage: Provides JavaScript use-case and developer-tooling context.
- raw.githubusercontent.com/unjs/citty/v0.2.2/README.md: Shows the scope of the released command and help APIs.
- dreamcli.kjanat.dev/guide/why: External comparison identifies prompts and completion as gaps.
Helps a lot6.5
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.5
It has typed args inferred from definitions, lazy subcommands, auto-generated usage, and in v0.2.2 aliases, plugins and a default subcommand. Open bugs remain, such as a subcommand also running the main command. Shell completions, variadic args and custom validation are missing. For complex CLIs, Commander, yargs and oclif cover more.
- github.com/unjs/citty/issues: Open bugs (#253, #244) and missing completions and variadic args
- github.com/unjs/citty/releases: v0.2.2 adds aliases, plugins, a default subcommand and type coercion
- pkgpulse.com/guides/citty-vs-caporal-vs-vorpal-modern-cli-frameworks-nodejs-2026: Praises typed args; notes basic validation and no completions
- npm hasTypes: Ships its own TypeScript types
GPT-6.2 Sol: 7.0, likely 5.8 to 8.0
Citty 0.2.2 combines inferred argument types, lazy nested commands, plugins, generated help, and documented error handling. Users report that subcommands can also run their parent handler and that camel-case aliases can get overly broad types. Commander.js provides richer option constraints, and Yargs generates shell completions. The examples give coding agents concrete patterns to follow, though agent accuracy and comparative startup performance remain unmeasured here.
- raw.githubusercontent.com/unjs/citty/v0.2.2/README.md: Documents lazy commands, plugins, usage, and error handling.
- github.com/unjs/citty/issues/253: User reports parent handler execution after a child command.
- github.com/unjs/citty/issues/244: User reports overly broad types for camel-case aliases.
- github.com/tj/commander.js: Documents environment-backed options, conflicts, and implications.
- github.com/yargs/yargs: Documents built-in Bash and Zsh completion generation.
Holds up over time6.2
Will it still be a good choice in two years?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
Nuxt and UnJS depend on it, which gives it a reason to keep living, and it had 3 releases and 41 commits in the last year. The last release was in April 2026, and 41 open PRs against 103 merged point to slow review that rests on few maintainers. Being pre-1.0, it has already shipped breaking changes and may ship more.
- github commitsLastYear / releasesLastYear: 41 commits and 3 releases in the last year
- github openPullRequests / mergedPullRequests: 41 open PRs against 103 merged
- npm latestPublishedAt: Latest release v0.2.2 on 2026-04-01
- github.com/unjs/citty/releases: Breaking changes in v0.2.0
GPT-6.2 Sol: 6.3, likely 5.0 to 7.6
Citty had 41 commits and three releases in the past year, with contributions from several people. The latest release shipped in April, and two reports affecting that version were still open in November. The 0.2 upgrade changed the parser and moved to ESM-only output. The lead maintainer reports full-time open-source support, while funding specifically for Citty and how widely release duties are shared remain unclear.
- github commitsLastYear, contributors, releasesLastYear, latestRelease, pushedAt: Shows ongoing activity and a release gap since April.
- github.com/unjs/citty/releases/tag/v0.2.2: Credits several contributors and lists parser and routing fixes.
- github.com/unjs/citty/releases/tag/v0.2.0: Records the parser switch and ESM-only distribution.
- github.com/unjs/citty/issues: Shows open reports on subcommand dispatch and argument types.
- vuefes.jp/2026/en/speaker/pi0: The lead maintainer reports support from Vercel and sponsors.
Used widely5.0
How many use it, and is that growing?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
About 197M downloads in 4 weeks, up 6.2x in a year against a 4.1 median, so it is gaining ground. Much of that volume comes in through nuxi, unbuild and other UnJS tools rather than direct choice. Its 8.1k dependent repos match Clipanion and oclif and are far below CAC (64k) and Commander (1M+).
- npm downloadsLast4Weeks: 196.9M, against 31.8M a year ago (6.2x)
- dependents repos: 8,123 repos and 84 packages
- github stars: 1,362 stars
- npmjs.com/package/citty: Weekly downloads in the millions
GPT-6.2 Sol: 4.5, likely 3.3 to 5.8
Four-week downloads rose 6.2× year over year, ahead of the 4.1× catalog baseline. The index found 8,123 dependent repositories and 84 packages, close to Clipanion’s repository count and well below CAC, Commander.js, and yargs. Tools such as older Nuxt CLI and giget releases pull Citty in indirectly, and repeated installs make it hard to tell how much download growth came from new projects choosing it.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: About 197 million downloads versus 32 million a year earlier.
- dependents, peers dependentRepos: Tracked adoption is closest to Clipanion among parsing peers.
- github stars, bluesky posts, hackerNews stories: 1,362 stars, seven Bluesky links, and no matched Hacker News stories.
- app.unpkg.com/%40nuxt/cli%403.32.0/files/dist/init-CbX2kZ7b.mjs: A published Nuxt CLI build imports Citty at runtime.
- raw.githubusercontent.com/unjs/giget/v2.0.0/package.json: Giget 2.0.0 declares Citty as a runtime dependency.
Vouched for5.8
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Nuxt's CLI is built on it, which is a strong production backer. Independent write-ups are few and partly auto-generated comparisons, though one 2026 guide recommends it for new TypeScript CLIs. It has no survey presence and no Hacker News stories.
- npmjs.com/package/nuxi-edge: Nuxt CLI rebuilt on citty
- pkgpulse.com/guides/citty-vs-caporal-vs-vorpal-modern-cli-frameworks-nodejs-2026: Independent guide recommends it for simple to moderate TypeScript CLIs
- devpick.pages.dev/citty-vs-commander: Comparison calls it less mature than Commander
- hackerNews stories: 0 stories
GPT-6.2 Sol: 6.5, likely 5.3 to 7.7
Nuxt CLI uses the 0.2 line, and Google Labs chose Citty for its DESIGN.md CLI on the older 0.1 line. An independent Bun CLI write-up reports that typed subcommands and generated help worked well in practice. These examples show use in shipped tools, while direct survey satisfaction and comparative performance evidence remain thin.
- github.com/nuxt/cli/blob/v3.36.1/packages/nuxi/package.json: Nuxt CLI builds against Citty 0.2.2.
- raw.githubusercontent.com/google-labs-code/design.md/0.4.0/packages/cli/package.json: Google Labs’ released CLI depends on the Citty 0.1 line.
- samir-bettahar.dev/blog/benchmark-cli-bun-citty: A practitioner describes a working four-subcommand Bun CLI.
Safe8.2
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has zero runtime dependencies, an MIT licence and no known advisories, so the attack surface is small. There is no OpenSSF Scorecard data, and publishing rests on a small UnJS team, so the range stays moderate.
- npm dependencies: 0 dependencies
- advisories total: No advisories
- scorecard: No Scorecard data
- github license: MIT
GPT-6.2 Sol: 8.3, likely 7.1 to 9.3
Citty 0.2.2 has zero runtime dependencies, a permissive MIT license, and zero recorded OSV advisories. An independent scan found no evidence of tampering or malware in that release. npm lists two collaborators, and the tagged source includes a release script that runs tests before npm publish. The missing OpenSSF Scorecard and unverified npm provenance leave some publishing controls uncertain.
- npm dependencies, npm license, advisories total, scorecard: Zero runtime dependencies, MIT, zero OSV advisories, and no Scorecard result.
- raw.githubusercontent.com/unjs/citty/v0.2.2/package.json: Shows the test, build, and npm publish script.
- npmjs.com/package/citty?activeTab=versions: npm lists pi0 and danielroe as collaborators.
- secure.software/npm/packages/citty: Independent artifact scan found no tampering or malware in 0.2.2.
Good
- It has zero dependencies since v0.2.0, and the install size fell from about 267 kB to about 23 kB.
- Argument types are inferred from defineCommand, so parsed args are typed without extra code.
- Nested and lazy-loaded subcommands, auto-generated usage, and a new plugin system and subcommand aliases are built in.
- The Nuxt CLI (nuxi) and UnJS tooling run it in production at very high install volume.
Bad
- It is still on 0.x, and v0.2.0 brought breaking changes (ESM-only, a switch to util.parseArgs, stricter types).
- It has no shell completions, no prompts and no variadic arguments, and those requests sit in long-open issues.
- 41 open PRs against 103 merged, plus bugs open since 2024, show limited maintainer bandwidth.
- It has fewer community examples, guides and plugins than Commander or yargs.
The numbers
- npm downloads, 4 weeks
- 197M ×6.2 in a year
- GitHub stars
- 1.4k
- Commits, 12 months
- 41
- npm version
- 0.2.2 Apr 2026
- Versions, 12 months
- 3
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (unjs/citty), npm (citty), OSV and the OpenSSF Scorecard.