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