Gathering detailed insights and metrics for inquirer-autocomplete-prompt
Gathering detailed insights and metrics for inquirer-autocomplete-prompt
Gathering detailed insights and metrics for inquirer-autocomplete-prompt
Gathering detailed insights and metrics for inquirer-autocomplete-prompt
@types/inquirer-autocomplete-prompt
TypeScript definitions for inquirer-autocomplete-prompt
inquirer-checkbox-plus-prompt
Checkbox with autocomplete and other additions for Inquirer
inquirer-autocomplete-prompt-ipt
Inquirer autocomplete prompt fork, optimized for ipt
@moyuyc/inquirer-autocomplete-prompt
Autocomplete prompt for inquirer
npm install inquirer-autocomplete-prompt
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (57.16%)
TypeScript (42.84%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
361 Stars
311 Commits
80 Forks
2 Watchers
8 Branches
23 Contributors
Updated on Jul 07, 2025
Latest Version
3.0.1
Package Id
inquirer-autocomplete-prompt@3.0.1
Unpacked Size
16.24 kB
Size
5.68 kB
File Count
4
NPM Version
9.8.1
Node Version
18.18.0
Published on
Sep 25, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
1
Autocomplete prompt for inquirer
1npm install inquirer-autocomplete-prompt
inquirer v9 and inquirer-autocomplete-prompt v3 and higher are native esm modules, this mean you cannot use the commonjs syntax require('inquirer-autocomplete-prompt')
anymore. If you want to learn more about using native esm in Node, I'd recommend reading the following guide. Alternatively, you can rely on an older version until you're ready to upgrade your environment:
npm install inquirer-autocomplete-prompt@^2.0.0
This prompt is anonymous, meaning you can register this prompt with the type name you please:
1import inquirer from 'inquirer'; 2import inquirerPrompt from 'inquirer-autocomplete-prompt'; 3 4inquirer.registerPrompt('autocomplete', inquirerPrompt); 5inquirer.prompt({ 6 type: 'autocomplete', 7 ... 8})
Change autocomplete
to whatever you might prefer.
Note: allowed options written inside square brackets (
[]
) are optional. Others are required.
type
, name
, message
, source
, [default
, validate
, filter
, when
, pageSize
, prefix
, suffix
, askAnswered
, loop
, suggestOnly
, searchText
, emptyText
]
See inquirer readme for meaning of all except source, suggestOnly, searchText and emptyText.
source will be called with previous answers object and the current user input each time the user types, it must return a promise (which resolves to an array of options).
source will be called once at at first before the user types anything with undefined as the value. If a new search is triggered by user input it maintains the correct order, meaning that if the first call completes after the second starts, the results of the first call are never displayed.
suggestOnly is default false. Setting it to true turns the input into a normal text input. Meaning that pressing enter selects whatever value you currently have. And pressing tab autocompletes the currently selected value in the list. This way you can accept manual input instead of forcing a selection from the list.
validate is called with the entered text when suggestOnly is set to true. When suggestOnly is false, validate is called with the choice object. In addition it is called with the answers object so far.
searchText Is the text shown when searching. Defaults: Searching...
emptyText Is the text shown if the search returns no results. Defaults: No results...
1import inquirer from 'inquirer'; 2import inquirerPrompt from 'inquirer-autocomplete-prompt'; 3 4inquirer.registerPrompt('autocomplete', inquirerPrompt); 5inquirer 6 .prompt([ 7 { 8 type: 'autocomplete', 9 name: 'from', 10 message: 'Select a state to travel from', 11 source: (answersSoFar, input) => myApi.searchStates(input), 12 }, 13 ]) 14 .then((answers) => { 15 // etc 16 });
See also example.js for a working example.
I recommend using this package with fuzzy if you want fuzzy search. Again, see the example for a demonstration of this.
ISC
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More