Expand description
User input abstraction — decouples interactive prompts from dialoguer.
Production uses TerminalInput (dialoguer). Tests inject [ScriptedInput]
(pre-programmed responses). E2E tests (separate process via assert_cmd) use
environment variables checked by TerminalInput before falling back to dialoguer.
§E2E test environment variables
These env vars are only consulted when NEX_TESTING=1 is set,
preventing abuse in production environments.
NEX_TESTING— guard: must be set for any test env vars to take effectNEX_TEST_PASSPHRASE— bypass password promptsNEX_TEST_CONFIRM— bypass confirm prompts (“y”/“true” = yes, anything else = no)NEX_TEST_INPUT— bypass text input prompts
Structs§
- Terminal
Input - Production input — reads from terminal via dialoguer.
Falls back to environment variables for e2e test support, but only
when
NEX_TESTINGis explicitly set to prevent abuse in production.
Traits§
- Input
Provider - Abstract input provider for user interaction.
Functions§
- input
- Get the active input provider.