info | twitter | github
J-_-L | Writings on Ruby Programming
19.01.12 24.05.12

pws: The ruby-powered command-line password manager

  • stores your passwords in a file on your disk
  • encrypts the file with a master password
  • is designed for every-day-use
  • is written in 234 lines of understandable Ruby code… Read it!
  • is tested with 222 Cucumber steps

This announcement is actually a follow-up of my previous tutorial on how to build a password safe in ruby. Unfortunately, I was not using it and did not update it for quite a while, sorry for that.. But I finally managed to refactor it, so now it comes with specs, colors, new features and thousands of other tweaks and improvements :D

Impression / Usage


Using a Ruby 1.9, do

$ gem install pws


Usage tips

I’ve got the following lines in my ~./bashrc

export PWS="$HOME/.safe/pws"
alias pw='pws'

The first line changes the password file location. In that ~/.safe folder, I actually use git to backup some of my pws files.

The second line allows a handy syntax for getting a password:

$ pw for github
Creative Commons License



Nathan B

This looks really great! Now you've got me thinking about an open source competitor to LastPass...



Wow! good work, i like this a lot :)



I was inspired by this to write a quick bash script that uses grep, vim and gpg to act as a password store on a flat file.


Rooby G

this a great guide.. I was try this at my home and it work..




Even though I do know how to develop iphone (and not only) apps I wouldn't guess that it is possible to store the password safely in one file.