Context
The add-imap command added in #193 only accepts passwords via interactive term.ReadPassword() prompt. This blocks headless/automated use cases like Docker containers and CI pipelines.
Proposal
Support an environment variable (e.g. MSGVAULT_IMAP_PASSWORD) as a fallback when stdin is not a terminal. Print a security warning when the env var path is used, recommending the interactive prompt for human users.
# Docker / CI usage
MSGVAULT_IMAP_PASSWORD="app-password-here" msgvault add-imap --host imap.mail.yahoo.com --username user@yahoo.com
The password should never be accepted via CLI flag (visible in shell history and ps output).
References
Context
The
add-imapcommand added in #193 only accepts passwords via interactiveterm.ReadPassword()prompt. This blocks headless/automated use cases like Docker containers and CI pipelines.Proposal
Support an environment variable (e.g.
MSGVAULT_IMAP_PASSWORD) as a fallback when stdin is not a terminal. Print a security warning when the env var path is used, recommending the interactive prompt for human users.The password should never be accepted via CLI flag (visible in shell history and
psoutput).References