Back to Explore

unjs/citty

GitHub
1 updates · last 90 days1 watchersOpen source

Last release: 2 months ago

Citty is an “Elegant CLI Builder” for Node.js, used to define command-line apps with typed argument parsing, boolean shortcuts, and nested sub-commands. It supports lazy, async loading of sub-commands, setup and cleanup hooks, and plugins to extend command behavior, with automatic help and version flags.

Project status

  • The source unjs/citty appears actively maintained, with a recent upstream push on 2026-06-07 and multiple versioned updates in 2026 (v0.2.0 to v0.2.2).
  • The apparent updates cadence is fairly regular in early 2026, with gaps of roughly 3 to 7 weeks between v0.2.0 (2026-01-20), v0.2.1 (2026-02-12), and v0.2.2 (2026-04-01). No tagged update is shown between 2026-04-01 and the 2026-06-07 push.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v0.2.2

    2 months ago

    v0.2.2 adds subcommand aliases, a plugin system, and support for default subcommands. The release also improves main help and version flag handling, fixes subcommand resolution consuming flag values, and enhances argument value coercion. Usage output formatting was refactored to show better hints, including aliases.

    Features
  • v0.2.1

    3 months ago

    v0.2.1 primarily fixes how negated boolean flags are handled, ensuring that --no-<flag> correctly affects both aliases and the main option. The release notes also mention formatting/tooling chores, and the code diff shows mostly formatting and dev tooling changes in addition to the parser behavior fix.

  • v0.2.0

    4 months ago

    v0.2.0 is a major internal refactor of citty’s argument parsing, switching to Node’s native `node:util.parseArgs` and tightening type-based parsing behavior. It also adds new CLI capabilities such as hiding commands via `meta.hidden`, supporting `enum` argument types (including validation), and improving help/usage output for negative boolean args.

    BreakingFeatures
  • v0.1.6

    2/14/2024

    Release v0.1.6 primarily updates the CLI usage renderer to include a valueHint for positional arguments. The code diff also includes internal refactoring in the parser, updates CI workflow action versions, and performs a large lockfile update with dev tooling dependency bumps.

  • v0.1.5

    11/20/2023

    v0.1.5 adds a way for callers to retrieve the result of executing a command, and it lets users override the internal showUsage behavior when running the CLI. It also bumps several development tooling dependencies and updates some CI workflow action versions.

    BreakingFeatures
  • v0.1.4

    9/9/2023

    v0.1.4 introduces a new `createMain` helper, adds `--version` handling in `runMain`, and adds support for per-command `cleanup()` hooks. It also adjusts subcommand parsing so that if no subcommand is provided, the absence of `E_NO_COMMAND` is avoided when the main command defines `run()`.

    Features
  • v0.1.3

    8/24/2023

    v0.1.3 primarily updates the public TypeScript typing for parsed CLI arguments to allow `string[]` values. It also refreshes dependency versions and tweaks CI autofix behavior to use a conventional commit message.

  • v0.1.2

    7/5/2023

    v0.1.2 updates citty with improved usage rendering (including resolving subcommand meta), switches CLI output formatting to consola, and adds an optional data field passed through command execution context. It also adjusts argument parsing to better handle generic typing and positional arguments marked with required: false. The release notes cover these items at a high level, but the code diff shows additional behavioral and output changes around error handling and usage formatting.

    BreakingFeatures
  • v0.1.1

    4/3/2023

    v0.1.1 focuses on fixing nested sub-command argument resolution, and improving type handling for unspecified argument types. The code changes also include packaging and dependency-structure updates (notably moving scule to devDependencies), plus a lockfile churn consistent with a dev tooling bump.

  • v0.1.0

    3/31/2023

    Release v0.1.0 contains no application/source code changes in the provided diff, only tooling and dependency metadata updates. The release notes only mention a “Chore” item about inlining dependencies, but the actual changes are primarily version bumps in devDependencies plus a pnpm packageManager version update.