aboutsummaryrefslogtreecommitdiff
path: root/pass-otp.1
blob: 3b69fd69632ce6a7ccfeb1e6d6db4bde12881ea2 (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
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
.TH PASS-OTP 1 "2017 February 14" "Password store OTP extension"

.SH NAME
pass-otp - A \fBpass\fP(1) extension for managing one-time-password (OTP) tokens.

.SH SYNOPSIS
.B pass otp
[
.I COMMAND
] [
.I OPTIONS
]... [
.I ARGS
]...

.SH DESCRIPTION

.B pass-otp
extends the
.BR pass (1)
utility with the
.B otp
command for adding OTP secrets, generating OTP codes, and displaying secret key
URIs using the standard \fIotpauth://\fP scheme.

If no COMMAND is specified, COMMAND defaults to \fBshow\fP.

.SH COMMANDS

.TP
\fBotp show\fP [ \fI--clip\fP, \fI-c\fP ] \fIpass-name\fP

Generate and print an OTP code from the secret key stored in \fIpass-name\fP. If
\fI--clip\fP or \fI-c\fP is specified, do not print the code but instead copy it to the clipboard using
.BR xclip (1)
and then restore the clipboard after 45 (or \fIPASSWORD_STORE_CLIP_TIME\fP)
seconds.

.TP
\fBotp insert totp\fP [ \fI--secret\fP=\fIkey\fP, \fI-s\fP \fIkey\fP ] [ \fI--algorithm\fP=\fIalgorithm\fP, \fI-a\fP \fIalgorithm\fP ] [ \fI--period\fP=\fIperiod\fP, \fI-p\fP \fIperiod\fP ] [ \fI--digits\fP=\fIdigits\fP, \fI-d\fP \fIdigits\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP

Insert a new TOTP secret into the password store called \fIpass-name\fP. If
\fI--secret\fP or \fI-s\fP are not specified, this will read \fIKEY\fP from
standard in. Prompt before overwriting an existing password, unless
\fI--force\fP or \fI-f\fP is specified. This command is alternatively named
\fBadd totp\fP.

.TP
\fBotp insert hotp\fP [ \fI--secret\fP=\fIkey\fP, \fI-s\fP \fIkey\fP ] [ \fI--digits\fP=\fIdigits\fP, \fI-d\fP \fIdigits\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP \fIcounter\fP

Insert a new HOTP secret into the password store called \fIpass-name\fP. A
\fIcounter\fP argument is required, which is an integer specifying the initial
HOTP counter stored alongside the secret. If
\fI--secret\fP or \fI-s\fP are not specified, this will read \fIKEY\fP from
standard in. Prompt before overwriting an existing password, unless
\fI--force\fP or \fI-f\fP is specified. This command is alternatively named
\fBadd hotp\fP.

.TP
\fBotp uri\fP [ \fI--clip\fP, \fI-c\fP | \fI--qrcode\fP, \fI-q\fP ] pass-name

Create and print a URI encoding the secret key and OTP parameters using the
standard \fIotpauth://\fP scheme. If \fI--clip\fP or \fI-c\fP is specified, do
not print the URI but instead copy it to the clipboard using
.BR xclip (1)
and then restore the clipboard after 45 (or \fIPASSWORD_STORE_CLIP_TIME\fP)
seconds. If \fI--qrcode\fP or \fI-q\fP is specified, do not print the URI but
instead display a QR code using
.BR qrencode (1)
either to the terminal or graphically if supported.

.SH OPTIONS

.TP
\fB\-c\fP, \fB--clip\fP
Put the OTP code in the clipboard.

.TP
\fB\-f\fP, \fB--force\fP
Force to update and do not wait for user instruction.

.TP
\fB-s\fP \fIkey\fP, \fB--secret\fR=\fIkey\fP
Provide a secret \fIkey\fP. This key must be base32-encoded.

.TP
\fB-a\fP \fIalgorithm\fP, \fB--algorithm\fP=\fIalgorithm\fP
Specify the \fIalgorithm\fP for a TOTP secret. Accepted values are \fIsha1\fP,
\fIsha256\fP, and \fIsha512\fP. This option defaults to \fIsha1\fP.

.TP
\fB-p\fP \fIperiod\fP, \fB--period\fP=\fIperiod\fP
Specify the \fIperiod\fP for a TOTP secret, in seconds. This option defaults to
\fI30\fP.

.TP
\fB-d\fP \fIdigits\fP, \fB--digits\fP=\fIdigits\fP
Specify the number of \fIdigits\fP this secret should generate when used with
\fBshow\fP. Accepted values are \fI6\fP and \fI8\fP. This option defaults to
\fI6\fP.

.TP
\fB\-h\fB, \-\-help\fR
Show usage message.

.SH SEE ALSO
.BR pass(1),


.SH AUTHORS
.B pass-otp
was written by
.MT tadfisher@gmail.com
Tad Fisher
.ME .


.SH COPYING
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.