Master Password

This is a Python implementation of the Master Password algorithm by Maarten Billemont. It also comes with a command line interface that lets you compute passwords for your sites based on your master password.


This package requires Python 3.5 and uses scrypt, cryptography (you need a compiler for both), click, and pyperclip.

Installation with pip:

$ pip install mpw

Or better, use pipsi:

$ pipsi install --python `which python3` mpw

This app copies the password to the clipboard. This should work out-of-the-box on OS X and Windows. On Linux, mpw makes use of the xclip or xsel commands, which should come with the os. Otherwise run:

$ sudo apt-get install xclip
$ # or
$ sudo apt-get install xsel

Alternatively, the gtk or PyQT4 modules can be installed.

Binary executables (e.g., an installer for Windows) may follow.


$ # Add a user
$ mpw adduser Alice
Enter master password:
Confirm master password:
Added user "Alice".
# Add a site for Alice
$ mpw addsite test-site
Enter master password for "Alice":
Added site "test-site" for user "Alice".
$ # Actually get the password
$ mpw get test-site
Enter master password for "Alice":
Password for "test-site" for user "Alice" was copied to the clipboard.
$ # You can also pipe a password to other commands:
$ mpw get -e server-root | sudo -S vim /etc/crontab

For more information take a look at the help:

$ mpw --help

Bash completion

In order to enable Bash completion for mpw, copy the following code into your .bashrc:

_mpw_completion() {
                  COMP_CWORD=$COMP_CWORD \
                  _MPW_COMPLETE=complete $1 ) )
   return 0

complete -F _mpw_completion -o default mpw;

Or just source the file mpw-complete.sh:

. path/to/mpw-complete.sh