NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3012 most downloaded on npm
Effortlessly build beautiful command-line apps 🪄 [Try the demo](https://stackblitz.com/edit/clack-prompts?file=index.js)
Last release 21 days ago
13 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 46 of 48 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
58 releases · first in 2023
One column per quarter.
8bd9129 Thanks @gameroman ! - Return type for prompts now correctly specifies CANCEL_SYMBOL instead of symbol
8bd9129 Thanks @gameroman! - Return type for prompts now correctly specifies CANCEL_SYMBOL instead of symbol
Updated dependencies [8bd9129]:
Updated dependencies [ 227583e , caa32e8 , 37fca4e , ae636dd , b20fa2b ]:
#592 caa32e8 Thanks @gameroman! - Export CANCEL_SYMBOL constant from @clack/core and @clack/prompts
#594 37fca4e Thanks @dreyfus92! - Add tab-completion to the path prompt: pressing Tab fills the input with the focused suggestion, so you can quickly descend into deep directories (type / and Tab again). Powered by a new opt-in completeOnTab option on autocomplete, which also shows a Tab: complete hint in the instructions footer. Default autocomplete behavior is unchanged.
#583 ae636dd Thanks @43081j! - Add async validation support to prompts, and validation state rendering to text prompts.
#588 6506135 Thanks @danielroe! - Style the guide bar rendered by box({ withGuide: true }) in grey so it matches the gutter drawn by log, note and the spinner
#599 0547d6f Thanks @43081j! - Fixes a withGuide rendering issue leaving extra spaces in text prompts.
Updated dependencies [227583e, caa32e8, 37fca4e, ae636dd, b20fa2b]:
Updated dependencies [ 4b24953 ]:
8f1c380 Thanks @dreyfus92! - Add showInstructions option to select, multiselect, and groupMultiselect. Keyboard hints remain shown by default; pass showInstructions: false to hide them.If you want the old behavior, provide a format() function:
#568 f87933f Thanks @florian-lefebvre! - Updates default formatter of note() to note dim lines anymore
If you want the old behavior, provide a format() function:
import { note } from '@clack/prompts';
+import { styleText } from 'node:util';
note(
'You can edit the file src/index.jsx',
'Next steps.'
+ { format: (text) => styleText('dim', text) }
);#567 cc6aab5 Thanks @dreyfus92! - Add keyboard instruction footers to select, multiselect, and groupMultiselect in the active state, matching autocomplete. No option — always shown.
8bd9129 Thanks @gameroman ! - Return type for prompts now correctly specifies CANCEL_SYMBOL instead of symbol
8bd9129 Thanks @gameroman! - Return type for prompts now correctly specifies CANCEL_SYMBOL instead of symbolPrompts accept an optional validate() function to validate user input. While a function provides more flexibility and customization over your validati
#543 83428ac Thanks @florian-lefebvre! - Adds support for Standard Schema validation
Prompts accept an optional validate() function to validate user input. While a function provides more flexibility and customization over your validation, it can be a bit verbose. To help solve this, there are libraries that provide schema-based validation to make shorthand and type-strict validation substantially easier.
Libraries following the Standard Schema specification are now natively supported. For example, using Arktype:
import { text } from '@clack/prompts';
import { type } from 'arktype';
const name = await text({
message: 'Enter your email',
+ validate: type('string.email').describe('Invalid email'),
});#542 adb6af9 Thanks @ghostdevv! - docs: add jsdoc for box, group, and group-multi-select
#534 3dcb31a Thanks @MattStypa! - Fixed spaces and uppercase characters in multiline prompt
#540 3170ed9 Thanks @ghostdevv! - docs: add jsdoc for autocomplete, confirm, and path prompts
Updated dependencies [83428ac, 3dcb31a]:
#595 227583e Thanks @dreyfus92! - Add an accessible option to the shared PromptOptions and a resolved accessible getter on the base Prompt, so any prompt can opt into accessible mode individually. Resolution order: per-prompt option > updateSettings({ accessible }) > the ACCESSIBLE environment variable.
#592 caa32e8 Thanks @gameroman! - Export CANCEL_SYMBOL constant from @clack/core and @clack/prompts
#594 37fca4e Thanks @dreyfus92! - Add tab-completion to the path prompt: pressing Tab fills the input with the focused suggestion, so you can quickly descend into deep directories (type / and Tab again). Powered by a new opt-in completeOnTab option on autocomplete, which also shows a Tab: complete hint in the instructions footer. Default autocomplete behavior is unchanged.
#583 ae636dd Thanks @43081j! - Add async validation support to prompts, and validation state rendering to text prompts.
#593 b20fa2b Thanks @dreyfus92! - Add isAccessible() and an accessible setting as the foundation for accessible mode. Resolution order: per-call option > updateSettings({ accessible }) > the ACCESSIBLE environment variable (any non-empty value enables it, except 0 and false).
Prompts accept an optional validate() function to validate user input. While a function provides more flexibility and customization over your validati
#543 83428ac Thanks @florian-lefebvre! - Adds support for Standard Schema validation
Prompts accept an optional validate() function to validate user input. While a function provides more flexibility and customization over your validation, it can be a bit verbose. To help solve this, there are libraries that provide schema-based validation to make shorthand and type-strict validation substantially easier.
Libraries following the Standard Schema specification are now natively supported. For example, using Arktype:
import { text } from '@clack/prompts';
import { type } from 'arktype';
const name = await text({
message: 'Enter your email',
+ validate: type('string.email').describe('Invalid email'),
});3dcb31a Thanks @MattStypa! - Fixed spaces and uppercase characters in multiline promptmaxItems option for groupMultiselect, and removes indent when withGuide is set to falsetext, password, and multiline promptsea5702e: fix: add engines field expressing node >=20.12 requirement
9786226: Externalize fast-string-width and fast-wrap-ansi to avoid double dependencies
fast-string-width and fast-wrap-ansi to avoid double dependenciesdate prompt with format support (YMD, MDY, DMY)path prompt so directory: true correctly enforces directory-only selection while still allowing directory navigation, and add regression tests for both directory and default file selection behavior.placeholder option to autocomplete. When the placeholder is set and the input is empty, pressing tab will set the value to placeholder.withGuide: false in autocomplete and multiselect prompts.path directory mode so pressing Enter with an existing directory initialValue submits that current directory instead of the first child option, and add regression coverage for immediate submit and child-directory navigation.e3333fb: Replaces picocolors with Node.js built-in styleText.
picocolors with Node.js built-in styleText.limitOption param for better code readability, tweak types definitions6404dc1: Disallows selection of disabled options in autocomplete.
disabled options in autocomplete.withGuide support to select prompt.withGuide option checks.withGuide support in password and path prompts.withGuide support to selectKey prompt.withGuide support to password prompt.vertical arrangement option to confirm prompt.withGuide support to confirm prompt.withGuide support to spinner prompt.c713fd5: The package is now distributed as ESM-only. In v0 releases, the package was dual-published as CJS and ESM.
c713fd5: The package is now distributed as ESM-only. In v0 releases, the package was dual-published as CJS and ESM.
For existing CJS projects using Node v20+, please see Node's guide on Loading ECMAScript modules using require().
415410b: This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic.
7bc3301: Prompts now have a userInput stored separately from their value.
8409f2c: feat: add styleFrame option for spinner
2837845: Adds suggestion and path prompts
99c3530: Adds format option to the note prompt to allow formatting of individual lines
0aaee4c: Added new taskLog prompt for log output which is cleared on success
729bbb6: Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the updateSettings function to support multilingual CLIs.
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
// Per-instance customization
const spinner = prompts.spinner({
cancelMessage: "Operación cancelada", // "Operation cancelled" in Spanish
errorMessage: "Se produjo un error", // "An error occurred" in Spanish
});
// Global customization via updateSettings
prompts.updateSettings({
messages: {
cancel: "Operación cancelada", // "Operation cancelled" in Spanish
error: "Se produjo un error", // "An error occurred" in Spanish
},
});
// Settings can now be accessed directly
console.log(prompts.settings.messages.cancel); // "Operación cancelada"
// Direct options take priority over global settings
const spinner = prompts.spinner({
cancelMessage: "Cancelled", // This will be used instead of the global setting
});
44df9af: Adds a new groupSpacing option to grouped multi-select prompts. If set to an integer greater than 0, it will add that number of new lines between each group.
55645c2: Support wrapping autocomplete and select prompts.
9e5bc6c: Add support for signals in prompts, allowing them to be aborted.
f2c2b89: Adds AutocompletePrompt to core with comprehensive tests and implement both autocomplete and autocomplete-multiselect components in prompts package.
38019c7: Updates the API for stopping spinners and progress bars to be clearer
Previously, both the spinner and progress bar components used a single stop method that accepted a code to indicate success, cancellation, or error. This update separates these into distinct methods: stop(), cancel(), and error():
const spinner = prompts.spinner();
spinner.start();
// Cancelling a spinner
- spinner.stop(undefined, 1);
+ spinner.cancel();
// Stopping with an error
- spinner.stop(undefined, 2);
+ spinner.error();
As before, you can pass a message to each method to customize the output displayed:
spinner.cancel("Operation cancelled by user");
progressBar.error("An error occurred during processing");
c45b9fb: Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations.
f10071e: Using the group method, task logs can now have groups which themselves can have scrolling windows of logs.
df4eea1: Remove suggestion prompt and change path prompt to be an autocomplete prompt.
76fd17f: Added new box prompt for rendering boxed text, similar a note.
9a09318: Adds new progress prompt to display a progess-bar
1604f97: Add clearOnError option to password prompt to automatically clear input when validation fails
9bd8072: Add a required option to autocomplete multiselect.
19558b9: Added support for custom frames in spinner prompt
SpinnerResult type to describe the return type of spinnerrowPadding dynamically based on actual rendered lines instead of using a hardcoded value.selectableGroups boolean to the group multi-select prompt. Using selectableGroups: false will disable the ability to select a top-level group, but still allow every child to be selected individually.output and input streamstop method of a spinner no longer have dots stripped.clear method to spinner for stopping and clearing.placeholder to be a visual hint rather than a tabbable value.stop calls on spinners which have not yet been started.withGuide option to all prompts to disable the default clack bordercaseSensitive option@clack/core to 1.0.0Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
613179d: Adds a new indicator option to spinner, which supports the original "dots" loading animation or a new "timer" loading animation.
613179d: Adds a new indicator option to spinner, which supports the original "dots" loading animation or a new "timer" loading animation.
import * as p from "@clack/prompts";
const spin = p.spinner({ indicator: "timer" });
spin.start("Loading");
await sleep(3000);
spin.stop("Loaded");
a38b2bc: Adds stream API which provides the same methods as log, but for iterable (even async) message streams. This is particularly useful for AI responses which are dynamically generated by LLMs.
import * as p from "@clack/prompts";
await p.stream.step(
(async function* () {
yield* generateLLMResponse(question);
})()
);
8093f3c: Adds Error support to the validate function
Error support to the validate functionOption type and improves JSDocannotationsstripVTControlCharacters utility.a83d2f8: Adds a new updateSettings() function to support new global keybindings.
a83d2f8: Adds a new updateSettings() function to support new global keybindings.
updateSettings() accepts an aliases object that maps custom keys to an action (up | down | left | right | space | enter | cancel).
import { updateSettings } from "@clack/prompts";
// Support custom keybindings
updateSettings({
aliases: {
w: "up",
a: "left",
s: "down",
d: "right",
},
});
[!WARNING] In order to enforce consistent, user-friendly defaults across the ecosystem,
updateSettingsdoes not support disabling Clack's default keybindings.
801246b: Adds a new signal option to support programmatic prompt cancellation with an abort controller.
One example use case is automatically cancelling a prompt after a timeout.
const shouldContinue = await confirm({
message: "This message will self destruct in 5 seconds",
signal: AbortSignal.timeout(5000),
});
Another use case is racing a long running task with a manual prompt.
const abortController = new AbortController();
const projectType = await Promise.race([
detectProjectType({
signal: abortController.signal,
}),
select({
message: "Pick a project type.",
options: [
{ value: "ts", label: "TypeScript" },
{ value: "js", label: "JavaScript" },
{ value: "coffee", label: "CoffeeScript", hint: "oh no" },
],
signal: abortController.signal,
}),
]);
abortController.abort();
a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the escape key to cancel (ctrl+c).
| alias | action |
|---|---|
k |
up |
l |
right |
j |
down |
h |
left |
esc |
cancel |
spinner output for static CI environments### Patch Changes - Updated dependencies [4845f4f] - Updated dependencies [d7b2fb9] - @clack/core@0.3.5
360afeb: feat: adaptative max items
b27a701: add maxItems option to select prompt
spinner.message(msg: string)spinner conflict with terminal on error between spinner.start() and spinner.stop()c96eda5: Enable hard line-wrapping behavior for long words without spaces
58a1df1: Fix line duplication bug by automatically wrapping prompts to process.stdout.columns
process.stdout.columnsca08fb6: Support complex value types for select, multiselect and groupMultiselect.
select, multiselect and groupMultiselect.8a4a12f: add groupMultiselect prompt
groupMultiselect promptlog APIs. Supports log.info, log.success, log.warn, and log.error. For low-level control, log.message is also exposed.cc11917: Update default password mask
password mask54c1bc3: Breaking Change multiselect has renamed initialValue to initialValues
selectKey prompt typemultiselect has renamed initialValue to initialValues1251132: Multiselect: return Value[] instead of Option[].
Value[] instead of Option[].@clack/promptsd96071c: Don't mutate initialValue in multiselect, fix parameter type for validate().
d96071c: Don't mutate initialValue in multiselect, fix parameter type for validate().
Credits to @banjo for the bug report and initial PR!
Updated dependencies [d96071c]
83d890e: Fix text cancel display bug
### Patch Changes - Update README
7fb5375: Adds a new defaultValue option to the text prompt, removes automatic usage of the placeholder value.
defaultValue option to the text prompt, removes automatic usage of the placeholder value.61b88b6: Add group construct to group many prompts together
group construct to group many prompts togetherrequired option for multi-select493c592: Improve types for select/multiselect prompts. Numbers and booleans are now supported as the value option.
value option.94b24d9: Fix CJS ansi-regex interop
ansi-regex interopa99c458: Support initialValue option for text prompt
initialValue option for text promptb1341d6: Updated styles, new note component
fa09bf5: Use circle for radio, square for checkbox
7015ec9: Create new prompt: multi-select
e0b49e5: Update spinner so it actually spins
### Patch Changes - Update README
### Patch Changes - Updated dependencies [9d371c3] - @clack/core@0.0.12
### Patch Changes - Update README
### Patch Changes - d20ef2a: Update keywords, URLs - Updated dependencies [441d5b7] - Updated dependencies [d20ef2a] - Updated dependencies [fe13c2f]
### Patch Changes - Update README
### Patch Changes - 80404ab: Update README
### Patch Changes - a0cb382: Add main entrypoint - Updated dependencies [a0cb382] - @clack/core@0.0.10
main entrypoint### Patch Changes - Updated dependencies - @clack/core@0.0.9
### Patch Changes - a4b5e13: Initial release - Updated dependencies [a4b5e13] - @clack/core@0.0.8
Your coding agent can read these notes before it upgrades. Set up the MCP server →