-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplass.1
192 lines (192 loc) · 4.54 KB
/
plass.1
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.\" Copyright (c) 2022, 2023 Omar Polo <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd August 30, 2023
.Dt PLASS 1
.Os
.Sh NAME
.Nm plass
.Nd manage passwords
.Sh SYNOPSIS
.Nm
.Op Fl h
.Ar command
.Op Ar argument ...
.Sh DESCRIPTION
.Nm
is a password manager.
Every password lives inside a
.Xr gpg 1
encrypted file somewhere inside
.Pa ~/.password-store
which is managed with the
.Xr got 1
version control system to keep track of changes, recovery accidental
overwrites and synchronize it across devices.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl h
Display usage information and exit immediately.
.El
.Pp
The following commands are available:
.Bl -tag -width Ds
.It Cm cat Ar entries ...
Decrypt and print the content of
.Ar entries
in the given order.
.It Cm edit Ar entry
Interactively modify the content of the given
.Ar entry
with an editor.
.It Cm find Op Ar pattern
Print the entries of the store one per line, optionally filtered by
the case-insensitive extended regular expression
.Ar pattern .
.It Cm mv Ar from Ar to
Rename a password entry, doesn't work with directories.
.Ar from
must exist and
.Ar to
mustn't.
.It Cm rm Ar entries ...
Remove the given
.Ar entries
from the store.
.It Cm tee Oo Fl q Oc Ar entry
Persist the data read from standard input into the store under the given
.Ar entry
name and then print it again on the standard output unless the
.Fl q
option is given.
.El
.Pp
Password entries can be referenced using the path relative to the
store directory.
The file extension
.Dq \&.gpg
can be omitted.
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev PLASS_GPG
Path to the
.Xr gpg 1
executable.
.It Ev PLASS_STORE
Alternative path to the password store directory tree.
.It Ev VISUAL , Ev EDITOR
The editor spawned by
.Nm
.Cm edit .
If not set, the
.Xr ed 1
text editor will be used to give it the attention it deserves.
.El
.Sh FILES
.Bl -tag -width Ds
.It Pa ~/.password-store
Default password store.
.It Pa ~/.password-store/.gpg-id
File containing the GPG recipient used to encrypt the passwords.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
A got repository and password store can be initialized as follows:
.Bd -literal -offset indent
$ mkdir ~/.password-store
$ echo [email protected] > ~/.password-store/.gpg-id
$ gotadmin init ~/git/pass.git
$ got import -r ~/git/pass.git -m 'initial import' ~/.password-store
$ got checkout -E ~/git/pass.git ~/.password-store
.Ed
.Pp
see
.Xr got 1
for more information.
.Pp
To migrate from
.Xr pass 1 ,
delete
.Pa ~/.password-store
and check out it again using
.Xr got 1 .
.Pp
Generate a random password and save it to the clipboard:
.Bd -literal -offset indent
$ pwg | plass tee entry/name | xsel -b
.Ed
.Pp
Generate a TOTP token using the secret stored in the password store:
.Bd -literal -offset indent
$ plass cat 2fa/codeberg/op | totp
722524
.Ed
.Pp
Interactively edit the contents of
.Pa entry/name
with
.Xr mg 1 :
.Bd -literal -offset indent
$ env VISUAL=mg plass edit entry/name
.Ed
.Pp
Display the entries matching
.Sq key
arranged comfortably for reading in a terminal window:
.Bd -literal -offset indent
$ plass find key | rs
.Ed
.Pp
Enable tab-completion of
.Nm
command names and entries in
.Xr ksh 1 :
.Bd -literal -offset indent
$ set -A complete_plass_1 -- cat edit find mv rm tee
$ set -A complete_plass -- $(plass find)
.Ed
.Sh SEE ALSO
.Xr got 1 ,
.Xr gpg 1 ,
.Xr pwg 1 ,
.Xr totp 1
.Sh HISTORY
.Nm
was heavily influenced by
.Xr pass 1
in the design, but it's a different implementation that prioritizes ease
of use and composability.
.Sh AUTHORS
.An -nosplit
The
.Nm
utility was written by
.An Omar Polo Aq Mt [email protected] .
.Sh CAVEATS
.Nm
.Cm find
output format isn't designed to handle files containing newlines.
Use
.Xr find 1
.Fl print0
or similar if it's a concern.
.Pp
.Nm
.Cm mv
is not able to move directory trees, only file entries.
.Pp
There isn't an
.Cm init
sub-command, the store initialization must be performed manually.