SHH

Secret Squirrel

This is a command line utility for managing secure information such as accounts, passwords as individual files so that they can be easily managed in either a hg or git version control repository.

You won’t be hiding anything from the NSA with this level of encryption so it isn’t recommended that you make your repository publicly accessible.

Now with more tab completion and multi line editing!

Usage

Here you sit expectantly in front of a computer at the command line.

Either read the explanation below or checkout the following gist:

Install

gem install shh

Launch

Open all ‘secrets’ stored in ~/.secret

> shh

Opens all ‘secrets’ stored in foo/.secret

> shh foo

Note that shh will crash if the parent directory of .secret does not contain either a .hg or .git.

Authenticate

Enter your passphrase

This passphrase will be used to encrypt and decrypt all of your secrets so don’t make it too obvious.

Listing mode

This mode allows you to view and edit ‘entries’ (which are encrypted hashes stored in files)

> ls

amazon
bitbucket
evernote
gmail
rememberthemilk
yahoo
  • ls - list entries

  • cd <name> - edit or create entry

  • history <name> - view changes related to an entry

  • exhume <cs> <name> - view entry as at the specified changeset

  • quit

Editing mode

> cd bitbucket
shh:bitbucket > set foo
Enter new value for foo
bar
(bitbucket) > delete foo
  • ls - list keys

  • edit <key> - edit or create key using text editor (notepad or EDITOR)

  • set <key> - edit or create key from prompt

  • cat/less/more - show the value associated with a key

  • cp - copies the value of a key to the system clipboard

  • launch - launches the value associated with the key (really only useful for launching a url)

  • exec - executes the value associated with the key as a script (see scripting below)

  • rm <key> - remove a key

Quitting mode

You don’t want to be a quitter

Scripting

In a script the current entry is available as a variable called ‘entry’

Very Contrived Example:

browser = 'http://www.github.com/login'.to_browser
browser.text_field(:id, 'login_field').set hash['username']
browser.text_field(:id, 'password').set hash['password']
browser.button(:name, 'commit').click

Future plans for world domination

  • Add some color

  • Add more history commands using source control (hg/git) commands

  • Support other source control systems