pash/README.md

82 lines
2.0 KiB
Markdown
Raw Normal View History

2019-02-24 14:48:54 -06:00
# pash
A simple password manager using GPG.
2019-02-25 14:31:28 -06:00
```
pash
├─ dev/
│ ├─ github
├─ internet/
│ ├─ graalians
│ ├─ pixeljoint
│ ├─ nixers
└──┘
```
2019-02-25 00:55:10 -06:00
## Table of Contents
2019-02-25 00:54:14 -06:00
<!-- vim-markdown-toc GFM -->
* [Dependencies](#dependencies)
* [Usage](#usage)
* [FAQ](#faq)
2019-02-26 12:22:55 -06:00
* [How does this differ from `pass` or etc?](#how-does-this-differ-from-pass-or-etc)
2019-02-25 00:54:32 -06:00
* [Where are passwords stored?](#where-are-passwords-stored)
2019-11-08 06:48:13 -06:00
* [How can I use a public key?](#how-can-i-use-a-public-key)
2019-02-25 00:54:14 -06:00
<!-- vim-markdown-toc -->
2019-02-24 16:04:26 -06:00
## Dependencies
2019-02-25 01:04:16 -06:00
- `bash 4+`
- `gpg` or `gpg2`
2019-02-24 16:04:26 -06:00
2019-02-25 00:48:54 -06:00
**Clipboard Support**:
- `xclip` or `tmux`
2019-02-24 16:04:26 -06:00
## Usage
2019-05-22 13:58:56 -05:00
Examples: `pash add web/gmail`, `pash list`, `pash del google`, `pash show github`, `pash copy github`.
2019-02-24 16:04:26 -06:00
```
2019-02-25 00:48:54 -06:00
SYNOPSIS
2019-05-22 13:58:56 -05:00
pash [ add|del|show|list|copy ] [name]
2019-02-25 00:48:54 -06:00
COMMANDS
2019-05-22 13:58:56 -05:00
[a]dd [name] - Create a new password entry.
[c]opy [name] - Copy entry to the clipboard.
[d]el [name] - Delete a password entry.
[l]ist - List all entries.
[s]how [name] - Show password for an entry.
2019-02-24 16:04:26 -06:00
```
2019-02-25 00:53:48 -06:00
## FAQ
2019-02-26 12:22:55 -06:00
### How does this differ from `pass` or etc?
2019-05-24 03:26:46 -05:00
I was looking for a CLI password manager (*written in `bash`*) and wasn't happy with the options I had found. They either had multiple instances of `eval` (*on user inputted data*), lots of unsafe `bash` (*nowhere near being `shellcheck` compliant.*) or they were overly complex. The opposites for what I'd want in a password manager.
2019-02-26 12:22:55 -06:00
2019-11-08 06:48:13 -06:00
I decided to write my own. `pash` is written in pure `bash` (*minus `gpg`, `mkdir` and optionally `xclip`.*) and the codebase is minimal (*100~ lines*). `gpg` is used to generate passwords and store them in encrypted files.
2019-02-26 12:22:55 -06:00
2019-02-25 00:54:32 -06:00
### Where are passwords stored?
2019-02-25 00:53:48 -06:00
The passwords are store in GPG encrypted files located at `${XDG_DATA_HOME:=$HOME/.local/share}/pash}`.
2019-11-08 06:48:13 -06:00
### How can I use a public key?
2019-02-24 14:48:54 -06:00
2019-11-08 06:48:13 -06:00
Set the environment variable `PASH_KEYID` to the ID of the key you'd like to encrypt and decrypt passwords with.
Example:
```sh
2019-11-08 06:51:07 -06:00
export PASH_KEYID=XXXXXXXX
2019-11-08 06:48:13 -06:00
# This can also be an email.
export PASH_KEYID=dylan.araps@gmail.com
```