func handles the command model, typed input, and dependency injection without prescribing how a CLI should look. The packages below cover the presentation and interaction features commonly added around it. Each group includes a practical default and alternatives for projects with different compatibility or API requirements.
Reading the comparison
The download column reports approximate npm downloads from 2026-07-31 through 2026-08-06, shortened with M (million) and K (thousand). It is useful as an adoption signal, but includes automated and transitive installs; it is not a count of active users or a quality ranking.
The bundle column is a representative increase from a minified, tree-shaken, single-file ESM CLI measured with esbuild. Values are rounded to the nearest KiB. Bundle size is only one selection criterion. Also consider maintenance activity, supported Node.js versions, ESM/CJS compatibility, documentation, API design, accessibility, testability, and whether the library matches the interaction model of the CLI. Measure the real application entry before making a size-sensitive release decision.
Text colors and styles
Node.js provides util.styleText for basic ANSI styles without a dependency. The following packages are useful when a shared API, richer colors, or broader module compatibility matters.
| Package | Recent weekly downloads | Best suited for | Representative bundle increase |
|---|---|---|---|
picocolors | ≈218M | A small ESM/CJS API for common colors and emphasis; the default third-party choice for straightforward output | 2 KiB |
ansis | ≈44.5M | ESM/CJS support together with HEX/RGB colors, templates, and automatic fallback | 4 KiB |
chalk | ≈486M | A mature chainable API, rich color support, and broad ecosystem familiarity | 8 KiB |
kleur | ≈90.7M | A compact chainable ESM/CJS API, especially when an existing project already uses it | 2 KiB |
Start with picocolors for a new CLI that only needs common colors. Choose ansis for richer colors without giving up ESM/CJS support, or chalk when its established API and integrations matter more than the additional size.
Prompts, spinners, and task flows
| Package | Recent weekly downloads | Best suited for | Representative bundle increase |
|---|---|---|---|
@clack/prompts | ≈18.0M | Project creators and setup wizards that benefit from consistent prompts, logs, and spinners | 17 KiB |
@inquirer/prompts | ≈34.6M | Broader input types, modular imports, and custom prompt development | 28 KiB |
listr2 | ≈43.3M | Nested, concurrent, skippable, or dynamically updated groups of tasks | 79 KiB |
ora | ≈83.5M | One or a few standalone asynchronous operations with explicit success, warning, and failure states | 58 KiB |
Use @clack/prompts for a guided installation or configuration flow and @inquirer/prompts when the available prompt types or extension points are the deciding factor. ora fits an isolated operation; listr2 becomes more useful when several tasks must remain visible and have independent states.
Tables, progress, and highlighted output
| Package | Recent weekly downloads | Best suited for | Representative bundle increase |
|---|---|---|---|
cli-table3 | ≈32.1M | ANSI-aware tables with alignment, wrapping, or row and column spans | 34 KiB |
cli-progress | ≈10.1M | One or several progress bars for work with a measurable total | 24 KiB |
boxen | ≈27.7M | Bordered notices, summaries, and a small number of high-value messages | 49 KiB |
log-update | ≈43.9M | A low-level primitive for redrawing custom multi-line output in place | 34 KiB |
cli-table3 is the general choice for report-style output, while cli-progress is more appropriate when completion can be expressed numerically. Choose boxen for emphasis rather than layout. Use log-update when a packaged spinner or progress renderer cannot express the required output.
Full terminal interfaces
A TUI framework is appropriate when the application needs keyboard navigation, focus management, persistent multi-region layout, or full-screen updates. It is unnecessary for a table, prompt, or single spinner.
| Package | Recent weekly downloads | Best suited for | Representative bundle increase |
|---|---|---|---|
ink | ≈5.7M | React teams that want components, state, Flexbox-style layout, and component testing | 362 KiB |
terminal-kit | ≈202K | Imperative keyboard, mouse, screen-buffer, drawing, and image features | No reliable single-file result |
blessed | ≈1.4M | Maintaining widget-based terminal applications already built on its DOM-like API | 264 KiB |
Ink is the clearest starting point for a new React-based terminal application. Terminal Kit exposes a wider set of low-level terminal capabilities, but its dynamic resources require extra care when producing a single-file executable. Blessed remains relevant to existing applications; evaluate its maintenance and compatibility carefully before adopting it for a new project.
Used by well-known projects
These examples show how established projects use the same packages at different levels of interaction. They are references, not endorsements or substitutes for evaluating a library against the requirements of your own CLI.
| Package | Projects | Sources |
|---|---|---|
@clack/prompts | Vite’s create-vite, OpenClaw, create-t3-app, and OpenCode | Vite source, OpenClaw dependency |
ink | Claude Code, Gemini CLI, GitHub Copilot CLI, Cloudflare Wrangler, Prisma, Shopify CLI, and Canva CLI | Ink’s official project showcase |