1 e346be82 2022-06-29 op .\" Copyright (c) 2021, 2022 Omar Polo <op@omarpolo.com>
3 e346be82 2022-06-29 op .\" Permission to use, copy, modify, and distribute this software for any
4 e346be82 2022-06-29 op .\" purpose with or without fee is hereby granted, provided that the above
5 e346be82 2022-06-29 op .\" copyright notice and this permission notice appear in all copies.
7 e346be82 2022-06-29 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 e346be82 2022-06-29 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 e346be82 2022-06-29 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 e346be82 2022-06-29 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 e346be82 2022-06-29 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 e346be82 2022-06-29 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 e346be82 2022-06-29 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 1d631c07 2022-09-09 op .Dd September 9, 2022
19 e346be82 2022-06-29 op .Nd manage passwords
24 5a0f0861 2022-09-09 op .Op Ar argument ...
25 e346be82 2022-06-29 op .Sh DESCRIPTION
27 e346be82 2022-06-29 op is a simple password manager.
28 5a0f0861 2022-09-09 op It manages paswords stored in a directory tree rooted at
29 e346be82 2022-06-29 op .Pa ~/.password-store
30 e346be82 2022-06-29 op .Pq or at Ev PLASS_STORE ,
31 e346be82 2022-06-29 op where every password is a single file encrypted with
34 e346be82 2022-06-29 op Password entries can be referenced using the path relative to the
35 e346be82 2022-06-29 op store directory.
40 e346be82 2022-06-29 op The whole store is supposed to be managed by the
42 e346be82 2022-06-29 op version control system.
44 e346be82 2022-06-29 op The following commands are available:
45 e346be82 2022-06-29 op .Bl -tag -width Ds
46 e346be82 2022-06-29 op .It Cm cat Ar entries ...
47 e346be82 2022-06-29 op Decrypt and print the content of the given
49 5a0f0861 2022-09-09 op in the given order.
50 e346be82 2022-06-29 op .It Cm find Op Ar pattern
51 e346be82 2022-06-29 op Print one per line all the entries of the store, optionally filtered
54 8bd06def 2022-10-01 op .It Cm gen Oo Fl nq Oc Oo Fl c Ar chars Oc Oo Fl l Ar length Oc Op Ar entry
55 e346be82 2022-06-29 op Generate and persist a password for the given
59 e346be82 2022-06-29 op can be used to control the characters allowed in the password
62 e346be82 2022-06-29 op i.e. all the printable ASCII characters)
66 e346be82 2022-06-29 op .Pq 32 by default .
69 e346be82 2022-06-29 op flag is provided,
71 e346be82 2022-06-29 op prints the generated password.
74 8bd06def 2022-10-01 op flag is given the password won't be persisted and the
76 8bd06def 2022-10-01 op argument is optional.
77 e346be82 2022-06-29 op .It Cm mv Ar from Ar to
78 e346be82 2022-06-29 op Rename a password entry, doesn't work with directories.
80 e346be82 2022-06-29 op must exists and
83 e346be82 2022-06-29 op .It Cm rm Ar entries ...
84 e346be82 2022-06-29 op Remove the given
86 e346be82 2022-06-29 op from the store.
87 e346be82 2022-06-29 op .It Cm tee Oo Fl q Oc Ar entry
88 e346be82 2022-06-29 op Prompt for a password and persist it into the store under the given
90 5a0f0861 2022-09-09 op name and the print it again on the standard output unless the
92 5a0f0861 2022-09-09 op option is given.
94 e346be82 2022-06-29 op .Sh CREATING A PASSWORD STORE
95 e346be82 2022-06-29 op A password store is just a normal
97 e346be82 2022-06-29 op repository with a worktree checkout out in
98 e346be82 2022-06-29 op .Pa ~/.password-store
99 e346be82 2022-06-29 op .Pq or at Ev PLASS_STORE .
100 e346be82 2022-06-29 op The only restriction is that a special file called
102 e346be82 2022-06-29 op must exist in the root of the work tree for most
104 e346be82 2022-06-29 op commands to work.
106 e346be82 2022-06-29 op For example, a got repository and password store can be initialized as
108 e346be82 2022-06-29 op .Bd -literal -offset indent
109 355fc9e0 2022-09-09 op $ mkdir ~/.password-store
110 355fc9e0 2022-09-09 op $ echo foo@example.com > ~/.password-store/.gpg-id
111 355fc9e0 2022-09-09 op $ gotadmin init ~/git/pass.git
112 355fc9e0 2022-09-09 op $ got import -r ~/git/pass.git -m 'initial import' ~/.password-store
113 e346be82 2022-06-29 op $ got checkout -E ~/git/pass.git ~/.password-store
118 e346be82 2022-06-29 op for more information.
120 e346be82 2022-06-29 op Otherwise, if a repository already exists, a password store can be
121 e346be82 2022-06-29 op checked out as:
122 e346be82 2022-06-29 op .Bd -literal -offset indent
123 e346be82 2022-06-29 op $ got checkout ~/git/pass.git ~/.password-store
126 e346be82 2022-06-29 op To migrate from
129 e346be82 2022-06-29 op .Pa ~/.password-store
130 e346be82 2022-06-29 op and check out it again using
132 e346be82 2022-06-29 op .Sh ENVIRONMENT
133 e346be82 2022-06-29 op .Bl -tag -width Ds
134 e346be82 2022-06-29 op .It Ev PLASS_CHARS
135 e346be82 2022-06-29 op default range of characters to use to generate passwords.
136 e346be82 2022-06-29 op .It Ev PLASS_GOT
140 e346be82 2022-06-29 op .It Ev PLASS_GPG
144 e346be82 2022-06-29 op .It Ev PLASS_LENGTH
145 e346be82 2022-06-29 op Default length for the generated passwords.
146 e346be82 2022-06-29 op .It Ev PLASS_STORE
147 e346be82 2022-06-29 op Path to the password store directory tree.
150 e346be82 2022-06-29 op .Bl -tag -width Ds
151 e346be82 2022-06-29 op .It Pa ~/.password-store
152 e346be82 2022-06-29 op Password store used by default.
153 e346be82 2022-06-29 op .It Pa ~/.password-store/.gpg-id
154 e346be82 2022-06-29 op File containing the gpg recipient used to encrypt the passwords.
156 e346be82 2022-06-29 op .Sh ACKNOWLEDGEMENTS
158 e346be82 2022-06-29 op was heavily influenced by
160 e346be82 2022-06-29 op in the design, but it's a completely different implementation with
161 e346be82 2022-06-29 op different tools involved.
166 e346be82 2022-06-29 op utility was written by
167 e346be82 2022-06-29 op .An Omar Polo Aq Mt op@omarpolo.com .
171 e346be82 2022-06-29 op output format isn't designed to handle files containing newlines.
175 e346be82 2022-06-29 op or similar if it's a concern.
177 e346be82 2022-06-29 op There isn't a
179 e346be82 2022-06-29 op sub-command, the store initialization must be performed manually.