A collection of common interactive command line user interfaces.
MIT License
Bot releases are hidden (Show)
message
option of each prompt must now be a string
. It could previously be an asynchronous function. See recipes for a migration option.New features!
required
prompt config. Makes sure at least one choice is selected.validate
prompt config. Provide a function that'll validate the user selection with any logic you want (like enforcing a min or max selection amount.) Please use this config with parsimony since complicated validation scheme can lead to sub-optimal UX!validate
config; but it was rarely used. It's been removed and prompts relying on it are expected to handle it on their own (no default value.) The types were updated accordingly and will raise issue if you're using typescript.AsyncPromptConfig
, it's been deprecated in favour of PromptConfig
- import type { AsyncPromptConfig } from '@inquirer/core';
+ import type { PromptConfig } from '@inquirer/core';
- type Config = AsyncPromptConfig & { custom: 'value' };
+ type Config = PromptConfig<{ custom: 'value' }>;
Note: Old interface works for now, but is marked as deprecated.