all repos — pw @ 43901a26cb4f0c59b2ef1350202049ce4011019d

minimal password store

readme.md (view raw)

 1# pw
 2> a mnml password manager
 3
 4## Dependencies
 5
 6- `bash`
 7- `gpg2` (will add `gpg` support later)
 8- `xclip` for clipboard support
 9
10## Usage
11
12Requires `PW_KEY` to be set. Do so by appending this to your `.bashrc`
13/ `.zshrc`:
14
15```shell
16export PW_KEY=user@mail.id
17```
18This is your GPG key's associated email ID.
19
20Optionally, you may set `PW_DIR` to your desired path to change the
21default password store location, which is `~/.pw`.
22
23```
24pw - mnml password manager
25
26usage: pw [options] [NAME]
27All options except -i and -h require a NAME argument.
28
29options:
30  -i            Initializes password directory at $HOME/.pw or at $PW_DIR, if it exists.
31  -a            Add a password.
32  -g            Generate a password.
33  -s            Print password to STDOUT.
34  -l            List out all passwords.
35  -c            Copy existing password to clipboard.
36  -d            Delete password.  
37  -h            Display this help message and exit.
38```
39
40## Examples
41
42```shell
43$ PW_DIR=~/passwords pw -i
44pw: password directory initialized at /home/icy/passwords
45
46$ pw -a twitter
47enter password: 
48pw: /home/icy/.pw/twitter.gpg created
49
50$ pw -c twitter
51pw: copied twitter to clipboard
52
53$ pw -s twitter
54notmyrealpassword
55
56$ pw -g github
57pw: generated password for github
58pw: /home/icy/.pw/github.gpg created
59
60$ pw -l
61fake
62github
63more
64passwords
65some
66twitter
67```
68
69## Notes
70
71- Uses `pwgen -s` to generate passwords.
72- Lacks directory support because I don't need it.
73- Why not `pass(1)`? 700 lines vs 100 lines.