'\" t .\" Title: lpass .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/27/2015 .\" Manual: lpass .\" Source: lpass .\" Language: English .\" .TH "LPASS" "1" "05/27/2015" "lpass" "lpass" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" lpass \- command line interface for LastPass .SH "SYNOPSIS" .sp .nf \fBlpass\fR [ \-\-version, \-v | \-\-help, \-h ] \fBlpass\fR [] .fi .SH "DESCRIPTION" .sp \fIlpass\fR is a simple command line interface to LastPass\&. It is comprised of several subcommands: .sp .if n \{\ .RS 4 .\} .nf lpass \fBlogin\fR [\-\-trust] [\-\-plaintext\-key [\-\-force, \-f]] USERNAME lpass \fBlogout\fR [\-\-force, \-f] lpass \fBshow\fR [\-\-sync=auto|now|no] [\-\-clip, \-c] [\-\-all|\-\-username|\-\-password|\-\-url|\-\-notes|\-\-field=FIELD|\-\-id|\-\-name] {UNIQUENAME|UNIQUEID} lpass \fBls\fR [\-\-sync=auto|now|no] [GROUP] lpass \fBedit\fR [\-\-sync=auto|now|no] [\-\-non\-interactive] {\-\-name|\-\-username|\-\-password|\-\-url|\-\-notes|\-\-field=FIELD} {NAME|UNIQUEID} lpass \fBgenerate\fR [\-\-sync=auto|now|no] [\-\-clip, \-c] [\-\-username=USERNAME] [\-\-url=URL] [\-\-no\-symbols] {NAME|UNIQUEID} LENGTH lpass \fBduplicate\fR [\-\-sync=auto|now|no] {UNIQUENAME|UNIQUEID} lpass \fBrm\fR [\-\-sync=auto|now|no] {UNIQUENAME|UNIQUEID} lpass \fBsync\fR [\-\-background, \-b] .fi .if n \{\ .RE .\} .SS "Synchronization" .sp The \fI\-\-sync\fR options control when the current operation involves a synchronization with the server\&. If \fInow\fR is set, and the command makes a change, the change is synchronized before the command exits\&. If \fInow\fR is set, and the command displays a value, the local cache is synchronized before the value is shown\&. If \fInow\fR is set, and the command is otherwise successful, but synchronization fails, the command will return an error\&. If \fIauto\fR is set, and the command makes a change, the change is synchronized to the server in the background\&. If \fIauto\fR is set, and the command displays a value, the local cache is synchronized before the value is shown only if the local cache is more than 5 seconds (or \fILPASS_AUTO_SYNC_TIME\fR seconds, if set) old\&. If \fIno\fR is set, the command will not interact with the server, unless there is a current upload queue being processed\&. Any local changes that are not synchronized with the server will exist in a queue of timestamped requests which will be synchronized on the next occurring synchronization\&. .sp The \fIsync\fR command forces a synchronization of the local cache with the LastPass servers, and does not exit until the local cache is synchronized or until an error occurs\&. Alternatively, if \fI\-\-background\fR is specified, the synchronization occurs in a daemonized process\&. .SS "Agent" .sp An agent process will be spawned in the background on a first successful command, and all subsequent commands will use the agent for decryption, instead of asking a user for a password\&. The agent will quit after one hour, unless the \fILPASS_AGENT_TIMEOUT\fR environment variable is set to an alternative number of seconds in which to quit, or 0 to never quit\&. If the environment variable \fILPASS_AGENT_DISABLE\fR is set to 1, the agent will not be used\&. .SS "Password Entry" .sp If available, the \fBpinentry\fR program, part of \fBgpg2\fR(1), may be used for inputting passwords if it is installed\&. If unavailable, or if the \fILPASS_DISABLE_PINENTRY\fR environment variable is set to 1, passwords will be read from standard input and a prompt will be displayed on standard error\&. .SS "Entry Specification" .sp Commands that take a \fIUNIQUENAME\fR will fail if the provided name is used multiple times, and return an error\&. Commands may alternatively take a \fIUNIQUEID\fR, which will be the integer \fIID\fR provided by LastPass for identifying entries uniquely\&. Commands that take either a \fINAME\fR or a \fIUNIQUEID\fR will create a new entry if a \fINAME\fR is specified and otherwise overwrite an existing entry if \fIUNIQUEID\fR is specified\&. .SS "Logging In" .sp The \fIlogin\fR subcommand will initialize a cache and configuration folder inside the current user\(cqs home directory \(en \fI~/\&.lpass\fR \(en or in the directory specified by the environment variable \fILPASS_HOME\fR\&. It will then attempt to authenticate itself with the LastPass servers, using the provided command line credentials or by interactively prompting (in the case of multifactor or an unprovided password)\&. The \fI\-\-trust\fR option will cause subsequent logins to not require multifactor authentication\&. If the \fI\-\-plaintext\-key\fR option is specified, the decryption key will be saved to the hard disk in plaintext\&. Please note that use of this option is discourages except in limited situations, as it greatly decreases the security of data\&. .sp The \fIlogout\fR subcommand will remove the local cache and stored encryption keys\&. It will prompt the user to confirm, unless \fI\-\-force\fR is specified\&. .SS "Viewing" .sp The \fIshow\fR subcommand will display a password or selected field\&. .sp The \fIls\fR subcommand will list names in groups in a tree structure\&. .SS "Modifying" .sp The \fIedit\fR subcommand will edit the selected field\&. If \fI\-\-non\-interactive\fR is not set, the selected field will be edited using \fIEDITOR\fR; otherwise the command will accept data until EOF or, unless the notes field is being edited, the first new line\&. .sp The \fIgenerate\fR subcommand will create a randomly generated password for the chosen key name, and optionally add a url and username while inserting the generated password\&. .sp The \fIrm\fR command will remove the specified entry, and the \fIduplicate\fR command will create a duplicate entry of the one specified, but with a different \fIID\fR\&. .SS "Clipboard" .sp Commands that take a \fI\-c\fR or \fI\-\-clip\fR option will copy the output to the clipboard, using \fBxclip\fR(1) or \fBxsel\fR(1) on X11\-based systems or \fBpbcopy\fR(1) on OSX\&. .SS "Configuration" .sp All configuration may be specified via environment variables\&. Alternatively, a set of environment variable overrides may be specified in \fI~/\&.lpass/env\fR in the form of: .sp .if n \{\ .RS 4 .\} .nf VARIABLE1=VALUE1 VARIABLE2=VALUE2 \&... .fi .if n \{\ .RE .\} .SH "ENVIRONMENT VARIABLES" .sp The following environment variables may be used for configuration as described in the section above: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fILPASS_HOME\fR .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fILPASS_AUTO_SYNC_TIME\fR .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fILPASS_AGENT_TIMEOUT\fR .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fILPASS_AGENT_DISABLE\fR .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fILPASS_DISABLE_PINENTRY\fR .RE