@clack/prompts
1.9.0 · 9 Nov 2026MIT48.7M / weekRepositoryHomepagenpmAtom feed
1.9.0 is the newest release of 1.x.
In short
1 breaking29 new28 fixed3 internal
- Breaking
The package is now distributed as ESM-only. In
v0releases, the package was dual-published as CJS and ESM.
Release note
Major Changes
- Breaking
The package is now distributed as ESM-only. In
v0releases, 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().
Minor Changes
This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic.
Prompts now have a
userInputstored separately from theirvalue.Add styleFrame option for spinner
Adds suggestion and path prompts
Adds
formatoption to the note prompt to allow formatting of individual linesAdded new
taskLogprompt for log output which is cleared on successAdd support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the
updateSettingsfunction 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 });Adds a new
groupSpacingoption to grouped multi-select prompts. If set to an integer greater than 0, it will add that number of new lines between each group.Support wrapping autocomplete and select prompts.
Add support for signals in prompts, allowing them to be aborted.
Adds
AutocompletePromptto core with comprehensive tests and implement bothautocompleteandautocomplete-multiselectcomponents in prompts package.Updates the API for stopping spinners and progress bars to be clearer
Previously, both the spinner and progress bar components used a single
stopmethod that accepted a code to indicate success, cancellation, or error. This update separates these into distinct methods:stop(),cancel(), anderror():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");Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations.
Using the
groupmethod, task logs can now have groups which themselves can have scrolling windows of logs.Remove
suggestionprompt and changepathprompt to be an autocomplete prompt.Added new
boxprompt for rendering boxed text, similar a note.Adds new
progressprompt to display a progess-barAdd
clearOnErroroption to password prompt to automatically clear input when validation failsAdd a
requiredoption to autocomplete multiselect.Added support for custom frames in spinner prompt
Patch Changes
Fixes multiselect only shows hints on the first item in the options list. Now correctly shows hints for all selected options with hint property.
Clamp scrolling windows to 5 rows.
Prevents placeholder from being used as input value in text prompts
Fix placeholder rendering when using autocomplete.
Fixes rendering of multi-line messages and options in select prompt.
Add withGuide support to note prompt
Fix spinner clearing too many lines upwards when non-wrapping.
Change styling of disabled multi-select options to have strikethrough.
Exposes a new
SpinnerResulttype to describe the return type ofspinnerWrap spinner output to allow for multi-line/wrapped messages.
Fix duplicated logs when scrolling through options with multiline messages by calculating
rowPaddingdynamically based on actual rendered lines instead of using a hardcoded value.Strip destructive ANSI codes from task log messages.
Add support for wrapped messages in multi line prompts
Fix note component overflow bug
Adds a new
selectableGroupsboolean to the group multi-select prompt. UsingselectableGroups: falsewill disable the ability to select a top-level group, but still allow every child to be selected individually.Removed all trailing space in prompt output and fixed various padding rendering bugs.
note: Hard wrap text to column limit
Updates all prompts to accept a custom
outputandinputstreamUse a default import for picocolors to avoid run time errors in some environments.
Messages passed to the
stopmethod of a spinner no longer have dots stripped.Allow disabled options in multi-select and select prompts.
Add missing nullish checks around values.
Switched from wrap-ansi to fast-wrap-ansi
Fixes missing guide when rendering empty log lines.
Add
clearmethod to spinner for stopping and clearing.note, box: Handle CJK correctly
Changes
placeholderto be a visual hint rather than a tabbable value.Fixes wrapping of cancelled and success messages of select prompt
Handle
stopcalls on spinners which have not yet been started.Add missing guide line in autocomplete-multiselect
Fix autocomplete bar color when validate
Fix spinner's dots behavior with custom frames
Add a new
withGuideoption to all prompts to disable the default clack borderShow symbol when withGuide is true for log messages
select-key: Fixed wrapping and added new
caseSensitiveoptionAllow custom writables as output stream.
Update key binding text to show tab/space when navigating, and tab otherwise.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.