amplify-prompts is an internal utility package within the AWS Amplify CLI monorepo, providing standardized terminal I/O functions for interactive command-line experiences. It is currently at version 2.6.8, with the broader Amplify CLI ecosystem seeing frequent releases (e.g., v14.x.x). This package is not typically intended for direct consumption by end-user applications but is crucial for developers extending or building upon the Amplify CLI itself. It offers a consistent API for various prompting needs like text input, confirmations, and selections, ensuring a uniform user experience across different Amplify CLI commands and custom categories. It ships with TypeScript types, facilitating robust development for CLI contributors. Its release cadence is tied to the broader Amplify CLI releases, making it a stable component within that ecosystem.
npm install amplify-promptsVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic interactive terminal input, confirmation, and selection using amplify-prompts utilities.
Consider if you truly need to use this package directly. For application-level prompts, a general-purpose library like `inquirer` or `prompts` might be more appropriate and stable. If extending the Amplify CLI, follow official contribution guidelines.
Ensure your Node.js environment matches the recommended version for the Amplify CLI you are targeting. Regularly update your Node.js and npm versions. Verify behavior in a controlled environment before deployment.
For automation, ensure all prompts are either bypassed with CLI flags (if available in the calling Amplify command) or pre-configured with answers. When testing, use mocking libraries to simulate user input.
For new development within the Amplify CLI ecosystem, prefer ES Module imports (`import { ... } from 'pkg';`). Ensure your project's `tsconfig.json` and `package.json` are configured for ESM if necessary.Ensure you are using named imports with curly braces: `import { input } from 'amplify-prompts';`. Verify your bundler configuration correctly handles module resolution.Review the calling Amplify CLI command for options to provide non-interactive answers (e.g., `--yes`, `--force`). If directly using `amplify-prompts`, ensure logic bypasses interactive prompts when `process.stdout.isTTY` is false or use a mocking library for tests.
This is often an environmental issue when running in a debugger or an IDE's output window that doesn't fully simulate a TTY. Try running the script directly from your system's terminal.
No dependency data recorded yet.