Skip to content
Simple command line password manager using a flat file as a database and GPG encryption
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status


A simple command line password manager using bash and a GPG encrypted flat file

Passbox is a tool for managing a GPG encrypted text file as a password database.

Please bear in mind that due to the highly configurable nature of GnuPG and passbox, all responsibility for keeping your passwords secure and backed up is on you.

Credit to drduh/ for some ideas. Please check that project out as it might suit your needs better.


  • Search/Add/Update/Delete password entries
  • Generate random passwords
  • Manage additional custom fields other than just username/password
  • Configurable symmetric/asymmetric encryption
  • Cross platform clipboard support
  • Configure settings such as passbox file location from '.passboxrc' config file


The aim is to support as many OSs as possible, the tests are ran against OSX and Linux only but Windows support could potentially be achieved though the use of Cygwin or MSYS (MSYS comes along with a standard install of Git on Windows)

  • GnuPG
  • Grep
  • Bash


curl -L > ./passbox && chmod +x ./passbox


usage: passbox [action]

Passbox - command line password manager utility

   add-field     <entry name>               Update an existing entry to add additional fields to
   delete        <entry name>               Remove an entry from the password database
   get           <entry name>               Get a particular password entry by it's name
   generate                                 Generate a new random password
   new                                      Prompt to create a new passbox entry
   remove-field  <entry name> <field name>  Update an existing entry to remove additional fields
   search        <search pattern>           Search the password database for a particular string, returns all matching entries
   update        <entry name>               Update an existing entry in the password database

The default location of the passbox file is '~/passbox.gpg' however this can be overridden using the PASSBOX_LOCATION env variable. So for example you could put this in your .bashrc:

export PASSBOX_LOCATION='~/dropbox/passwords.gpg'

Passbox uses symmetric encryption by default, this means that the data is encrypted using a simple passphrase. You can enable asymmetric encryption by setting the following environment variables:


Asymmetric cryptography uses a public key for encryption and the private key for decryption. You can generate yourself a public/private key pair by using gpg --gen-key and following the prompts.


Tests are ran locally against the 'test/' directory using bats e.g. bats test/

WARNING: The tests will temporarily override the 'PASSBOX_LOCATION' env variable before each test but will restore it again after

Similar Projects

  • drudh/ - Script to manage passwords in an encrypted file using gpg
  • pass - Standard UNIX password manager
You can’t perform that action at this time.