Blob


1 .\" Copyright (c) 2021, 2022 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd October 2, 2022
15 .Dt PLASS 1
16 .Os
17 .Sh NAME
18 .Nm plass
19 .Nd manage passwords
20 .Sh SYNOPSIS
21 .Nm
22 .Op Fl h
23 .Ar command
24 .Op Ar argument ...
25 .Sh DESCRIPTION
26 .Nm
27 is a simple password manager.
28 Passwords are stored as a directory tree where every password is a
29 file encrypted with
30 .Xr gpg 1 .
31 .Pp
32 A password store is a
33 .Xr got 1
34 repository with a worktree checked out at
35 .Pa ~/.password-store
36 .Pq or Ev PLASS_STORE .
37 The only restriction is that a special file called
38 .Pa .gpg-id
39 containing the GPG recipient must exist in the root of the directory tree
40 for most
41 .Nm
42 commands to work.
43 .Pp
44 Password entries can be referenced using the path relative to the
45 store directory.
46 The file extension
47 .Dq \&.gpg
48 is optional.
49 .Pp
50 The following commands are available:
51 .Bl -tag -width Ds
52 .It Cm cat Ar entries ...
53 Decrypt and print the content of
54 .Ar entries
55 in the given order.
56 .It Cm find Op Ar pattern
57 Print the entries of the store one per line, optionally filtered by
58 .Ar pattern .
59 .It Cm gen Oo Fl nq Oc Oo Fl c Ar chars Oc Oo Fl l Ar length Oc Ar entry
60 Generate and persist a password for the given
61 .Ar entry
62 in the store.
63 .Fl c
64 can be used to control the characters allowed in the password
65 (by default
66 .Dq !-~
67 i.e. all the printable ASCII characters)
68 and
69 .Fl l
70 the length
71 .Pq 32 by default .
72 Unless the
73 .Fl q
74 flag is provided, print the generated password.
75 If the
76 .Fl n
77 flag is given the password won't be persisted and the
78 .Ar entry
79 argument is optional.
80 .It Cm mv Ar from Ar to
81 Rename a password entry, doesn't work with directories.
82 .Ar from
83 must exist and
84 .Ar to
85 mustn't.
86 .It Cm rm Ar entries ...
87 Remove the given
88 .Ar entries
89 from the store.
90 .It Cm tee Oo Fl q Oc Ar entry
91 Prompt for a password and persist it into the store under the given
92 .Ar entry
93 name and the print it again on the standard output unless the
94 .Fl q
95 option is given.
96 .El
97 .Sh ENVIRONMENT
98 .Bl -tag -width Ds
99 .It Ev PLASS_CHARS
100 default range of characters to use to generate passwords.
101 .It Ev PLASS_GOT
102 Path to the
103 .Xr got 1
104 executable.
105 .It Ev PLASS_GPG
106 Path to the
107 .Xr gpg 1
108 executable.
109 .It Ev PLASS_LENGTH
110 Default length for the generated passwords.
111 .It Ev PLASS_STORE
112 Path to the password store directory tree.
113 .El
114 .Sh FILES
115 .Bl -tag -width Ds
116 .It Pa ~/.password-store
117 Password store used by default.
118 .It Pa ~/.password-store/.gpg-id
119 File containing the GPG recipient used to encrypt the passwords.
120 .El
121 .Sh EXIT STATUS
122 .Ex
123 .Sh EXAMPLES
124 A got repository and password store can be initialized as follows:
125 .Bd -literal -offset indent
126 $ mkdir ~/.password-store
127 $ echo foo@example.com > ~/.password-store/.gpg-id
128 $ gotadmin init ~/git/pass.git
129 $ got import -r ~/git/pass.git -m 'initial import' ~/.password-store
130 $ got checkout -E ~/git/pass.git ~/.password-store
131 .Ed
132 .Pp
133 see
134 .Xr got 1
135 for more information.
136 .Pp
137 To migrate from
138 .Xr pass 1 ,
139 delete
140 .Pa ~/.password-store
141 and check out it again using
142 .Xr got 1 .
143 .Pp
144 To generate a temporary random password use
145 .Bd -literal -offset indent
146 $ plass gen -n
147 .Ed
148 .Pp
149 Display the entries matching
150 .Sq key
151 arranged comfortably for reading in a terminal window:
152 .Bd -literal -offset indent
153 $ plass find key | rs
154 .Ed
155 .Sh SEE ALSO
156 .Xr got 1 ,
157 .Xr gpg 1 ,
158 .Xr pass 1
159 .Sh HISTORY
160 .Nm
161 was heavily influenced by
162 .Xr pass 1
163 in the design, but it's a different implementation that prioritizes ease
164 of use and composability.
165 .Sh AUTHORS
166 .An -nosplit
167 The
168 .Nm
169 utility was written by
170 .An Omar Polo Aq Mt op@omarpolo.com .
171 .Sh CAVEATS
172 .Nm
173 .Cm find
174 output format isn't designed to handle files containing newlines.
175 Use
176 .Xr find 1
177 .Fl print0
178 or similar if it's a concern.
179 .Pp
180 .Nm
181 .Cm mv
182 is not able to move directory trees, only file entries.
183 .Pp
184 There isn't a
185 .Cm init
186 sub-command, the store initialization must be performed manually.