aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: 5974ffb57a08c53ccee33269c561ea51d8788c91 (plain) (blame)
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
# dpw the dynamic password manager

Inspired by [`pass`](https://www.passwordstore.org/) and designed to be
partly compatible out of the box.

The main point of this is to provide a somewhat familiar command line interface
for pluggable backends.

For instance, one could write a plugin that talks to Lastpass, Bitwarden
Hasicorp's Vault, or similar.

There are some mild changes in the interface from `pass`, a full list
of commands and options are available with the `-h` command line flag.

The environment variable `DPW_BACKEND` defaults to `dpw-gpg` which provides
the `pass` compatible backend. Since it's just a call to another executable
the backends can be written in any language.

I can also highly recommend my blog post on [GnuPG / GPG / PGP on a Yubikey](
https://riedstra.dev/2021/08/pgp-yubikey). That way your private key isn't
even exposed to your computer, only the utilization of it is.

## Usage under Wayland

It should "just work" out of the box, if it doesn't check that you have
`wl-clipboard` installed. If it still doesn't work, try setting:

```
export XDG_SESSION_TYPE=wayland
```

## dmenu script

There's also a small dmenu script included that makes copying or typing
out passwords and OTP tokens very quick and easy

## Backends

The `dpw-gpg` shell script should be short enough to read to give you an
idea for implementing your own. That being said the interface is blindingly
simple, accept the following four commands:

  * list
    * dump a list of the available keys, supporting arguments for sub keys
	  may be preferred by users but isn't necessary, `find` will still work
	  for them.
  * insert `<key>`
    * Read from stdin
  * show `<key>`
    * Dump to stdout
  * rm `<key>`
  * init ( optional )

`dpw` will take care of all the additional commands by wrapping the four
above as needed.