Skip to content

Latest commit

 

History

History

password-prompt

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

password-prompt

Glue tool to read a password on tty (not stdin) and print to stdout.

Synopsis

passwordprompt [PROMPT STRING]

Use cases

In shell scripts, add password=$(prompt-password) to prompt a password with messing with stty(1).

Some apps read passwords from env variables, files or customizable commands (e.g. to run pass), but are incapable of reading passwords interactively themselves. prompt-password is useful here as an external command that will effectively read the password interactively. Examples:

  • borgmatic (with encryption_passcommand: password-prompt)
  • vdirsyncer (with password.fetch = ["command", "password-prompt"])
  • mbsync (mbsync is able to prompt a password)