unjs

unjs/citty

TypeScript MIT Dev Tools

🌆 Elegant CLI Builder

1.3k stars
51 forks
active
GitHub +2 / week

1.3k

Stars

51

Forks

59

Open issues

25

Contributors

v0.2.2 01 Apr 2026

AI Analysis

Citty is a lightweight, zero-dependency CLI builder for Node.js that leverages native util.parseArgs and provides features like nested sub-commands, lazy loading, and a pluggable API. It is best suited for developers building command-line tools who want a minimal footprint with modern TypeScript support, and is particularly valuable for those building larger CLI applications that benefit from lazy-loaded sub-commands.

Dev Tools CLI Tool Discovery value: 6/10
Documentation 8/10
Activity 9/10
Community 7/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

cli-builder typescript zero-dependency command-line nodejs
Actively maintained Well documented MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1w ago

Lightweight TypeScript CLI framework leveraging Node's native parseArgs, positioned as zero-dependency alternative to heavier CLI builders

Citty is a TypeScript-first CLI framework built on Node.js's native util.parseArgs, offering nested subcommands, lazy loading, plugin architecture, and auto-generated help. Created by the unjs collective in March 2023, it targets developers building Node CLI tools who want minimal dependencies and lightweight bundles. Adoption appears concentrated within the unjs ecosystem and projects requiring TypeScript-native CLI construction. Real-world production adoption beyond unjs projects is not clearly documented.

Origin

Launched March 2023 by unjs (authors of Consola, Unbuild, and other ecosystem tools). Emerged during the period when Node.js stabilized util.parseArgs as a native alternative to external parsing libraries. Reflects a deliberate design choice to build CLI infrastructure for the unjs family of projects.

Growth

Gained ~1,279 stars over 3+ years at a modest rate (~5 stars/week recently). Growth trajectory suggests niche adoption rather than viral expansion. No evidence of major inflection points. Activity remains steady with recent push 2026-07-02, indicating active maintenance but not accelerating adoption. Adoption curve appears flat relative to competitors like Commander.js (28k stars) or Cac (3k stars).

In production

Adoption not verified beyond unjs ecosystem. Project is listed as 'Elegant CLI Builder' with npm downloads tracked, but no case studies, company testimonials, or widely-known consumer projects documented in README. Package popularity metrics exist but adoption scope remains unclear. Lack of public production deployment stories is notable gap.

Code analysis
Architecture

Based on README: zero-dependency design built atop Node.js util.parseArgs. Supports declarative command definition via defineCommand(), nested subcommands with lazy/async resolution, plugin system with setup/cleanup hooks, and argument type system (positional, string, boolean, enum). Likely uses TypeScript generics for type-safe argument access. Repository metadata shows active TypeScript codebase.

Tests

Not documented in README. No test statistics, coverage metrics, or test suite organization visible in provided materials.

Maintenance

Last push 2026-07-02 (current date 2026-07-03) indicates active day-to-day maintenance. Repository created 2023-03-14, now ~3.25 years old. MIT license, 50 forks suggest modest but genuine community engagement. No indicators of abandonment or major disruption. Maintenance appears steady rather than intensive.

Honest verdict

ADOPT IF: You are building Node CLI tools in TypeScript, prioritize minimal dependencies and native Node APIs, want lazy-loaded subcommand support, and have tolerance for a smaller ecosystem than Commander or Yargs. AVOID IF: You need widespread ecosystem tooling, extensive third-party plugins, broad JavaScript (non-TypeScript) compatibility, or confidence that your framework choice has proven production validation at scale. MONITOR IF: You are evaluating TypeScript CLI frameworks and want to track whether Citty gains traction beyond the unjs ecosystem — growth signals will clarify if it becomes a meaningful alternative to Cac and Commander.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

2/10

Risks
  • Adoption not verified beyond unjs projects; unknown production usage density makes risk assessment for critical CLI tools difficult
  • TypeScript-only focus may limit adoption in mixed JavaScript/TypeScript codebases or projects avoiding TypeScript overhead
  • Smaller ecosystem relative to Commander.js and Yargs means fewer third-party integrations, middleware, and StackOverflow answers
  • Dependence on Node.js util.parseArgs availability (Node 16.17+, 18.3+) creates minimum version floor; older LTS adoption may be limited
  • Maintenance is steady but not high-velocity; new features or breaking changes may lag user expectations relative to more heavily-funded competitors
Prediction

Citty will likely remain a solid, well-maintained choice within the TypeScript CLI builder niche, particularly for unjs-aligned projects and teams valuing minimal dependencies. Mainstream adoption beyond TypeScript-first teams seems unlikely without major ecosystem catalyst (e.g., major Node.js project switching to it, large enterprise endorsement). Will probably stabilize as a 'good for specific use case' tool rather than category leader.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

TypeScript
100%

Information

Language
TypeScript
License
MIT
Last updated
4d ago
Created
40mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

cacjs

cacjs/cac

CAC is a lightweight TypeScript framework for building command-line...

3.1k TypeScript
bloomberg

bloomberg/stricli

Stricli is a TypeScript framework for building type-safe command-line...

1.1k TypeScript Dev Tools
tj

tj/commander.js

Commander.js is a mature, widely-adopted Node.js library for building...

28.3k JavaScript Dev Tools
unjs

unjs/unbuild

unbuild is a unified JavaScript build system that provides a Rollup-based...

2.7k TypeScript Dev Tools
nestjs

nestjs/nest-cli

The Nest CLI is a command-line tool for initializing, developing, and...

2.2k TypeScript Dev Tools
vs. alternatives
Commander.js (28,302 stars)

Dominant JavaScript CLI framework. 22x larger user base. Commander offers similar nested command support but with broader ecosystem maturity and documentation. Citty targets TypeScript-native workflows and lighter bundles; Commander maintains broader JavaScript compatibility.

Cac (3,097 stars)

TypeScript CLI builder also zero-dependency. Similar positioning to Citty. Cac has 2.4x more stars despite similar release window. Direct competitor for TypeScript-first use case with comparable feature set.

Yargs (7,900+ stars)

Feature-rich JavaScript CLI parser. Much larger installation base. Yargs offers extensive plugins and middleware; Citty emphasizes minimalism and modern Node APIs.

Consola (7,291 stars, same maintainer collective)

Also from unjs. Consola handles logging/output; Citty handles CLI parsing/command structure. Complementary rather than competitive. Consola's higher star count may indicate unjs ecosystem reach, but doesn't necessarily indicate Citty's adoption.

Stricli (1,057 stars)

TypeScript CLI framework close to Citty in star count. Direct niche competitor. Stricli's lower adoption despite similar positioning suggests the TypeScript CLI builder category remains fragmented without clear winner.