Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Command-line password safe

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 sdb
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

sdb

A command-line password safe.

Build Status

Installation

sdb depends on xsel. If you are on a Debian-based Linux distro, you can install xsel by typing:

# apt-get install xsel

You can install sdb straight from GitHub.

$ pip install -e git://github.com/gavinwahl/sdb.git@master#egg=sdb

Usage

To save a password

$ sdb add foobar.com
Password:
Username: bill
Password [blank to generate]:
Notes:

To retrieve that password

$ sdb show foobar.com
Password:
bill@foobar.com

Note: The username and then the password will be put in the X clipboard until you press enter or paste them. If you're not running X (or there is no $DISPLAY), the password will be printed.

Alternatively, you can see all of the passwords you have stored by typing

$ sdb raw
Password:
('foobar.com', 'bill', 'XXXXXXXXXXXXXXXXXXX', '')

The show command will list several choices if more than one matches.

$ sdb show f
Password:
0) ('foobar.com', 'bill', 'XXXXXXXXXXXXXXXXXXX', '')
1) ('foofoo.com', 'bill', 'XXXXXXXXXXXXXXXXXXX', '')
Which did you mean? [0]:

You can change your password if you like

$ sdb edit foo
Password:
Name [foo.com]:
Username [foo]:
Password []/g:
Notes:
Edit? [n]:

If you want to delete a password you can do that too.

$ sdb delete foo
Password:
username@foo.com
Really? [n]:

Remembering the master password

sdb will automatically use gpg-agent if it is running. To start gpg-agent for only the current terminal, you can use

eval $(gpg-agent --daemon)

To use it everywhere, start it in your .xsession file.

Something went wrong with that request. Please try again.