Inquirer-autocomplete-standalone provides a robust and flexible command-line interface prompt for displaying dynamic, filterable choices to users. It functions as a standalone component built on the core principles of Inquirer.js, allowing developers to integrate autocomplete functionality without needing the full `inquirer-autocomplete-prompt` package. This package, currently at version 0.8.1, is designed as a native ECMAScript module (ESM), requiring Node.js environments that support ESM. It supports both synchronous and asynchronous data sources, making it ideal for scenarios where choices need to be fetched from external APIs or computed on-the-fly based on user input. Its key differentiator is its modular, standalone nature, aligning with the modern Inquirer.js approach of independent prompts. This contrasts with the legacy `inquirer-autocomplete-prompt` package, which transitioned to ESM in v3 and provided a CJS fallback in v2. Users seeking a modern, ESM-first autocomplete prompt should opt for this package. While no explicit release cadence is stated for this specific `standalone` package, its parent project and related `inquirer-autocomplete-prompt` indicate active maintenance.
npm install inquirer-autocomplete-standaloneVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic asynchronous autocomplete prompt, allowing users to select a country from a dynamically filtered list, simulating an external API call.
Ensure your project is configured for ESM (add `"type": "module"` to `package.json` and use `import` statements), or use dynamic `await import()` for CommonJS environments: `const { default: autocomplete } = await import('inquirer-autocomplete-standalone');`Always verify you are installing `inquirer-autocomplete-standalone` for the modern, standalone prompt experience. If you need the legacy `inquirer-autocomplete-prompt` for Inquirer v9 or older, install that specifically.
Consult the official TypeScript documentation or examples (e.g., the `import-esm-in-typescript-examples` repository linked in the package README) for guidance on configuring `tsconfig.json` with settings like `"esModuleInterop": true` and `"moduleResolution": "bundler"` or `"node16"`.
Refer to the usage examples for `inquirer-autocomplete-standalone` and the latest Inquirer.js documentation on integrating custom or standalone prompts.
Add `"type": "module"` to your `package.json` to make your project an ESM module, or use dynamic import for this package in CommonJS: `const { default: autocomplete } = await import('inquirer-autocomplete-standalone');`For CommonJS, ensure you are using dynamic import and correctly accessing the default export: `const { default: autocomplete } = await import('inquirer-autocomplete-standalone');`. Verify the package is correctly installed.Run `npm install inquirer-autocomplete-standalone`. If `inquirer-autocomplete-prompt` was mistakenly installed, uninstall it first with `npm uninstall inquirer-autocomplete-prompt`.
No dependency data recorded yet.