Passpie lets you manage login credentials from the terminal with a coloroful/configurable cli interface. Password files are saved into yaml text files with passwords as GnuPG encrypted strings. Use your master passphrase to decrypt login credentials files, copy passwords to clipboard and more...
Passpie is built with Click and Tabulate for its interface, TinyDB for its database and python-gnupg for its encryption using gpg. Passpie is also inspired by great cli applications like git and httpie
- Console interface
- Manage multiple databases
- Add, update, remove credentials
- Copy passwords to clipboard
- List credentials as a table
- List credentials with a colored output
- Search credentials by name, login or comments
- Search with regular expression
- Group credentials by name
- Configuration from file.
~/.passpie
- Change passphrase and re-encrypt database
- Export Passpie database to plain text file
- Import plain text Passpie database
- Import credentials from Pysswords
- Randomly generated credential passwords
- Configurable random password generation
- Generate database status report
Planned features:
- Undo/Redo updates to the database
- Bulk update/remove credentials
- Import plain text Keepass
- Import credentials from 1Password
Make sure you have GPG installed:
Using pip
pip install passpie
If you are on a mac you can install Passpie using homebrew
brew tap marcwebbie/passpie
brew install passpie
The latest development version can be installed directly from GitHub:
pip install --upgrade https://github.com/marcwebbie/passpie/tarball/master
pip install -U passpie
brew upgrade passpie
# create a new credentials database.
passpie init
# add new credentials.
passpie add foo@example.com
passpie add bar@example.com
# add credential with random password
passpie add spam@egg.local --random
# edit credential "foo@example.com".
passpie update foo@example.com
# copy password from credential "foo@example.com" into system clipboard.
passpie copy foo@example.com
# search credentials by string "exam".
passpie search exam
# search credentials using regular expressions.
passpie search 'foo|bar'
# remove credential "foo@example.com".
passpie remove foo@example.com
# check database status
passpie status
# print all credentials as a table with hidden passwords
passpie
# specify other Passpie database. Option `-D` or `--database`
passpie -D /path/to/other/database
# shows help. Option `--help`
passpie --help
# shows version. Option `--version`
passpie --version
Usage: passpie [OPTIONS] COMMAND [ARGS]...
Options:
-D, --database PATH Alternative database path
--version Show the version and exit.
--help Show this message and exit.
Commands:
add Add new credential
copy Copy credential password to clipboard
export Export credentials in plain text
import Import credentials from path
init Initialize new passpie database
remove Remove credential
reset Renew passpie database and re-encrypt...
search Search credentials by regular expressions
status Diagnose database for improvements
update Update credential
Passpie fullname syntax handles login and name for credentials in one go for faster adding and querying.
login
@name
. Login is optional, when adding new credentials without login, login will be replaced by a _
character:
passpie add @banks/mybank --password 1234
passpie add @banks/myotherbank --password 5678
Listing the database would show:
$ passpie
================= ======= ========== =========
Name Login Password Comment
================= ======= ========== =========
banks/mybank _ *****
banks/myotherbank _ *****
================= ======= ========== =========
Assuming you have passpie database on the default path ~/.passpie
and a Dropbox shared directory on path ~/Dropbox
mv ~/.passpie ~/Dropbox/passpie
ln -s ~/Dropbox/passpie ~/.passpie
Assuming you have passpie database on the default path ~/.passpie
and a Google Drive shared directory on path ~/GoogleDrive
mv ~/.passpie ~/GoogleDrive/passpie
ln -s ~/GoogleDrive/passpie ~.passpie
# export database to a passpie database file called passpie.db
# Command: `export`
passpie export passpie.db
# import database from passpie database file called passpie.db
# Option: `import`
passpie import passpie.db
Passpie credentials handles multiple logins for each name which groups credentials by name:
# create john credential
passpie add jonh@example.com --comment "Jonh main mail" --random
# create doe credential
passpie add doe@example.com --comment "No comment" --random
# listing credentials
passpie
=========== ======= ========== ===============
name login password comment
=========== ======= ========== ===============
example.com doe ***** No comment
example.com jonh ***** Jonh main email
=========== ======= ========== ===============
Sometimes it is useful to have multiple databases with different passphrases for higher security. This can be done using -D
Passpie option.
# create personal Passpie database
passpie -D ~/databases/personal_passwords init
# create work Passpie database
passpie -D ~/databases/work_passwords init
# create junk Passpie database
passpie -D ~/databases/junk_passwords init
# add password to personal Passpie database
passpie -D ~/databases/personal_passwords add my@example
# add password to junk Passpie database
passpie -D ~/databases/junk_passwords add other@example
# listing specific databases
passpie -D ~/databases/junk_passwords
You can override default passpie configuration with a .passpierc
file on your home directory. Passpie configuration files must be written as a valid yaml file.
path: /Users/john.doe/.passpie
short_commands: true
genpass_length: 32
genpass_symbols: "_-#|+="
table_format: fancy_grid
headers:
- name
- login
- password
- comment
colors:
login: green
name: yellow
password: cyan
Options:
- path: path to database. Default:
~/.passpie
- short_commands: Use short commands aliases as in
passpie a
forpasspie add
- genpass_length: number. Default:
32
- genpass_symbols: characters. Default:
_-#|+="
- true
- false
- headers:
- fullname
- name
- login
- password
- comment
- table_format:
- rst
- simple
- orgtbl
- fancy_grid
- colors:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
Encryption is done with GnuGPG using AES256. Take a look at passpie.crypt module to know more.
The default database path is at ~/.passpie
. If you want to change the database path, add --database
option to passpie. Together with init
you can create arbitrary databases.
passpie --database "/path/to/another/database/" init
Passpie database is structured in a directory hierachy. Every
credential is a .pass
file inside a directory named after a credential group.
An empty database would look like this:
passpie --database /tmp/passpie init
tree /tmp/passpie -la
# /tmp/passpie
# └── .keys
After adding a new credential the database would look like this:
passpie --database /tmp/passpie add octocat@github.com
# Password: **********
tree /tmp/passpie -la
# /tmp/passpie
# ├── .keys
# └── github.com
# └── octocat.pass
If we add more credentials to group github.com. Directory structure would be:
passpie --database /tmp/passpie add octocat2@github.com
# Password: **********
tree /tmp/passpie -la
# /tmp/passpie
# ├── .keys
# └── github
# └── octocat.pass
# └── octocat2.pass
Feel free to comment, open a bug report or ask for new features on Passpie issues page or over Twitter.
If you want to contributing with code:
- Fork the repository https://github.com/marcwebbie/passpie/fork
- Read the Makefile
You probably have the python-gnupg
package installed. Passpie depends on isislovecruft fork of python-gnupg
To fix:
pip uninstall python-gnupg
pip install -U passpie
License (MIT License)
The MIT License (MIT)
Copyright (c) 2014-2015 Marc Webbie, http://github.com/marcwebbie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.