cpass

command module
v0.0.0-...-8aec175 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 11 Imported by: 0

README

Note: cpass is a work in progress. Work is currently being done to rewrite most of it, with reworked argument parsing, support for multiple password stores and encrypted password stores. (checkout the dev branch).
At this time cpass should be considered unstable.

cpass

CLI password manager written in Go.

In cpass password entries or "bookmarks" are identified in the format user@domain (e.g. sam@website.org). cpass doesn't actually store passwords anywhere. Instead, a password derivation algorithm is used (PBKDF2, SHA256, 5000 iterations) on your username+domain identifier, plus a secret key. The resulting of the key derivation algorith is encoded in base64 and stripped down to your desired length - this is your password.

Remember: your passwords are generated using a secret key - without knowledge of this key your passwords cannot be derived.

To build cpass, run mk or make (the Makefile supports both BSD and GNU make).

usage

cpass [-p] [-f] [-b FILE] COMMAND
  -p               print password to stdout.
  -b FILE          bookmarks JSON file to use.
  -f               do not ask before removing.
  COMMAND:
    help           show this help message.
    ls             list bookmarks.
    find STRING    search for bookmarks containing substring STRING.
    open BOOKMARK  open bookmark with identifier in `user@domain`
                   format.
    add ID KEYLEN  add a new bookmark. ID is `site@domain`, KEYLEN is
                   the desired limit of key length.
    rm ID          remove password. will ask to confirm unless -f is
                   given.

Note: functionality for adding and removing bookmarks has not yet been implemented.

Accessing a a bookmark is easy:

$ cpass open myuser@website.com
secret (will not echo):
copied to clipboard.

Listing available bookmarks:

$ cpass ls
joe.blogs@firefox.com (24)
jjb@tutanota.com (16)

Here, the number in parenthesis is the length of the password.

Finding bookmarks:

$ cpass find substring
joe.blogs@substring.com (32)

dependencies

cpass depends on the following Go modules:

Additionally, on Linux and *BSD xsel or xclip is required to copy passwords to the clipboard. You can probably install either of them using your package manager.

status

Currently there is only support for Linux and *BSD (X11), Windows and WSL2, because these are the operating systems I use daily.

cpass is still very much a work in progress, there is still much to be done.

plans

  • adding + editing bookmarks
  • removing bookmarks
  • encrypted bookmarks.json file for extra secrecy
  • configurable Terminal User Interface (TUI)
  • GUI version(?)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL