all repos — pw @ 1f8f54198a72a8b76c61e0d80db78ed7014747a5

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`. To override the
22default password length of 25, set `PW_LEN` to a number of your choice.
23
24```
25pw - mnml password manager
26
27usage: pw [options] [NAME]
28All options except -i and -h require a NAME argument.
29
30options:
31  -i            Initializes password directory at $HOME/.pw or at $PW_DIR, if it exists.
32  -a            Add a password.
33  -g            Generate a password.
34  -s            Print password to STDOUT.
35  -l            List out all passwords.
36  -c            Copy existing password to clipboard.
37  -d            Delete password.  
38  -h            Display this help message and exit.
39```
40
41## Examples
42
43```shell
44$ PW_DIR=~/passwords pw -i
45pw: password directory initialized at /home/icy/passwords
46
47$ pw -a twitter
48enter password: 
49pw: /home/icy/.pw/twitter.gpg created
50
51$ pw -c twitter
52pw: copied twitter to clipboard
53
54$ pw -s twitter
55notmyrealpassword
56
57$ pw -g github
58pw: generated password for github
59pw: /home/icy/.pw/github.gpg created
60
61$ pw -l
62fake
63github
64more
65passwords
66some
67twitter
68```
69
70## Notes
71
72- Uses `pwgen -s` to generate passwords.
73- Lacks directory support because I don't need it.
74- Why not `pass(1)`? 700 lines vs 100 lines.