Back to Explore

terkelg/prompts

GitHub
1 watchersOpen source

Last release: 10/7/2021

Prompts is a lightweight Node.js CLI utility for creating interactive, user-friendly prompts that ask users for information. It supports simple prompt objects, prompt chains, validation, and programmatic submission or cancellation callbacks, returning collected answers as an object.

Project status

  • The source appears to be in low-frequency maintenance, with the most recent upstream push reported as 2025-05-14, but the last documented update summaries shown here are from 2021 (v2.4.2, v2.4.1, v2.4.0).
  • Update cadence looks sparse based on the available history, with multi-year gaps between v2.4.0 (2020-11-08) and v2.4.1 (2021-04-01), and then v2.4.2 (2021-10-07).

AI summary generated Today

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

Recent updates

  • v2.4.2

    10/7/2021

    Release v2.4.2 primarily addresses a security issue described in the notes as a ReDoS fix. The code changes also include a substantial lockfile update and a devDependency version change that are not mentioned in the release notes.

    Security
  • v2.4.1

    4/1/2021

    v2.4.1 includes a fix for cursor behavior in the TextPrompt element. The documented change is limited to “Fixed issue with cursor in text prompt,” but the code shows a more specific rework of how cursor position is tracked and rendered.

  • v2.4.0

    11/8/2020

    v2.4.0 adds stream-related documentation, improves keyboard navigation behavior, and introduces escape handling changes centered around autocomplete. It also refactors rendering utilities to rely on the provided stdout width instead of process.stdout, and updates dependency versions.

    BreakingFeatures
  • v2.3.1

    2/14/2020

    Release v2.3.1 mainly addresses prompt rendering/navigation issues: multiselect prompt layout and a problem where pressing or using `home` resulted in `undefined`. It also updates development dependencies and related tooling.

  • v2.3.0

    11/10/2019

    v2.3.0 adds new configuration for limiting how many select or multiselect options are visible at once, and updates autocomplete behavior to remove multi-page rendering in favor of scrolling. It also fixes multiple prompt edge cases around falsy values, instruction rendering, and improves type evaluation ordering in the prompt chain.

    BreakingFeatures
  • v2.2.0

    8/5/2019

    v2.2.0 adds support for per-choice descriptions, improved instruction rendering for multiselect prompts, and more keyboard shortcuts (notably, J and K navigation and 'a' to toggle all choices in multiselect). It also includes multiple rendering fixes to avoid duplicate output and address an ALT+key issue.

    Features
  • v2.1.0

    5/21/2019

    v2.1.0 adds a new multi-select autocomplete prompt (autocompleteMultiselect) alongside existing prompt types. It also changes the build selection logic to fall back to the transpiled distribution on older Node.js versions (documented as Node < 8.6.0). Code changes also modify the existing multiselect prompt behavior and rendering logic.

    BreakingFeatures
  • v2.0.4

    3/16/2019

    v2.0.4 adds new prompt capabilities centered around `prompts.override` and improved autocomplete pagination. It also introduces a new `date` prompt implementation and updates several prompt behaviors around option navigation, default values, and formatting/validation flow.

    Features
  • v2.0.3

    2/16/2019

    v2.0.3 is a small patch release that primarily addresses default toggle prompt values. However, the actual diff also includes an internal prompt state rename, documentation changes around the select prompt API, and a Babel/toolchain upgrade with corresponding lockfile churn.

    BreakingFeatures
  • v2.0.0

    12/6/2018

    v2.0.0 ships an update to the `inject` feature. The release notes only mention a general improvement, but the actual implementation changes how injected answers are supplied and consumed by `prompts`.

    Features