LastPass command line interface tool
C Shell CMake Makefile
Latest commit 1d4d4cf Jan 2, 2018 @bcopeland bcopeland copyright: update dates to 2018
Happy New Year!

Signed-off-by: Bob Copeland <copeland@lastpass.com>
Permalink
Failed to load latest commit information.
cmake_extras build: fix install-doc on OSX Jan 3, 2017
contrib spelling: standard Nov 7, 2017
debian debian: add 1.2.2 version Oct 25, 2017
test copyright: update dates to 2018 Jan 2, 2018
.gitignore Update gitignore to exclude test dir test/.lpass Oct 12, 2017
.travis.yml run tests under travis Feb 17, 2017
CHANGELOG.md doc: v1.2.2 changelog update Oct 25, 2017
CMakeLists.txt edit: support ssh keys in interactive lpass add Aug 25, 2017
CONTRIBUTING CONTRIBUTING: clarify terms for future contributions Nov 10, 2015
COPYING Update FSF address. Nov 19, 2015
LICENSE.OpenSSL spelling: routines Nov 7, 2017
Makefile Merge branch 'topic-tests' Feb 17, 2017
README.md copyright: update dates to 2018 Jan 2, 2018
agent.c copyright: update dates to 2018 Jan 2, 2018
agent.h added lpass status command to get the status of the LastPass agent Jul 9, 2016
blob.c copyright: update dates to 2018 Jan 2, 2018
blob.h format: always initialize buffer with some space Mar 14, 2017
cipher.c copyright: update dates to 2018 Jan 2, 2018
cipher.h show: add support for viewing/saving attachments Dec 1, 2016
clipboard.c copyright: update dates to 2018 Jan 2, 2018
clipboard.h import LastPass CLI tool Oct 22, 2014
cmd-add.c copyright: update dates to 2018 Jan 2, 2018
cmd-duplicate.c copyright: update dates to 2018 Jan 2, 2018
cmd-edit.c copyright: update dates to 2018 Jan 2, 2018
cmd-export.c copyright: update dates to 2018 Jan 2, 2018
cmd-generate.c copyright: update dates to 2018 Jan 2, 2018
cmd-import.c copyright: update dates to 2018 Jan 2, 2018
cmd-login.c copyright: update dates to 2018 Jan 2, 2018
cmd-logout.c copyright: update dates to 2018 Jan 2, 2018
cmd-ls.c copyright: update dates to 2018 Jan 2, 2018
cmd-mv.c copyright: update dates to 2018 Jan 2, 2018
cmd-passwd.c copyright: update dates to 2018 Jan 2, 2018
cmd-rm.c copyright: update dates to 2018 Jan 2, 2018
cmd-share.c share: display the created share name Feb 23, 2017
cmd-show.c copyright: update dates to 2018 Jan 2, 2018
cmd-status.c copyright: update dates to 2018 Jan 2, 2018
cmd-sync.c copyright: update dates to 2018 Jan 2, 2018
cmd.c copyright: update dates to 2018 Jan 2, 2018
cmd.h export: allow customizing the list of exported fields Jun 7, 2017
config.c copyright: update dates to 2018 Jan 2, 2018
config.h config: support XDG base directory specification Jul 18, 2016
edit.c copyright: update dates to 2018 Jan 2, 2018
endpoints-login.c copyright: update dates to 2018 Jan 2, 2018
endpoints-share.c copyright: update dates to 2018 Jan 2, 2018
endpoints.c copyright: update dates to 2018 Jan 2, 2018
endpoints.h show: load attachments from getattach Sep 15, 2017
format.c copyright: update dates to 2018 Jan 2, 2018
format.h format: expand format specifiers, and support '/' modifier Oct 21, 2016
http.c copyright: update dates to 2018 Jan 2, 2018
http.h http: call curl_global_init in parent and child processes May 20, 2016
kdf.c copyright: update dates to 2018 Jan 2, 2018
kdf.h import LastPass CLI tool Oct 22, 2014
list.h export: allow customizing the list of exported fields Jun 7, 2017
log.c log: initialize fp to avoid crash in non-logging case Jul 18, 2016
log.h lpass: add CURL verbose debugging as an option Jun 23, 2016
lpass.1.txt format: support "%al" for account URL Jul 18, 2017
lpass.c copyright: update dates to 2018 Jan 2, 2018
notes.c copyright: update dates to 2018 Jan 2, 2018
notes.h blob: only do field concatenation for multiline fields Jun 21, 2017
password.c copyright: update dates to 2018 Jan 2, 2018
password.h import LastPass CLI tool Oct 22, 2014
pbkdf2.c copyright: update dates to 2018 Jan 2, 2018
pbkdf2.h update copyright year Jan 2, 2017
pins.h pins: remove GlobalSign R1/R3 pins Feb 8, 2016
process.c copyright: update dates to 2018 Jan 2, 2018
process.h import LastPass CLI tool Oct 22, 2014
session.c copyright: update dates to 2018 Jan 2, 2018
session.h spelling: session Nov 7, 2017
terminal.c copyright: update dates to 2018 Jan 2, 2018
terminal.h add --color=[auto|never|always] command line option Nov 7, 2014
upload-queue.c copyright: update dates to 2018 Jan 2, 2018
upload-queue.h upload_queue: use extensible arrays for params Mar 25, 2016
util.c copyright: update dates to 2018 Jan 2, 2018
util.h util: add ask_options Dec 1, 2016
version.h version: update to 1.2.2 Oct 25, 2017
xml.c copyright: update dates to 2018 Jan 2, 2018
xml.h share: implement 'lpass share limit' Feb 9, 2016

README.md

LastPass CLI

(c) 2014-2018 LastPass.

Command line interface to LastPass.com.

Operating System Support

lpass is designed to run on GNU/Linux, Cygwin and Mac OS X.

Dependencies

Installing on Linux

Arch

# from community repository
sudo pacman -S lastpass-cli
# from AUR repository
packer -S lastpass-cli-git

Fedora

  • Packages are available in Fedora 22 and later.
sudo dnf install lastpass-cli

Red Hat/Centos

  • Packages are available in EPEL for RHEL/CentOS 7 and later.
sudo yum install lastpass-cli
  • For older versions: Install the needed build dependencies, and then follow instructions in the 'Building' section.
sudo yum install openssl libcurl libxml2 pinentry xclip openssl-devel libxml2-devel libcurl-devel

Debian/Ubuntu

  • Install the needed build dependencies, and then follow instructions in the 'Building' section.

  • For Debian:

sudo apt-get install openssl libcurl3 libxml2 libssl-dev libxml2-dev libcurl4-openssl-dev pinentry-curses xclip
  • For Ubuntu:
sudo apt-get install openssl libcurl4-openssl-dev libxml2 libssl-dev libxml2-dev pinentry-curses xclip cmake build-essential pkg-config

Gentoo

  • Install the package:
sudo emerge lastpass-cli

Other Linux Distros

Install the packages listed in the Dependencies section of this document, and then follow instructions in the 'Building' section.

Installing on OS X

With Homebrew (easiest)

  • Install Homebrew, if necessary.
  • Update Homebrew's local formula cache:
brew update
  • Install the lastpass-cli formula:
brew install lastpass-cli --with-pinentry

Alternatively, if you want to install the documentation as well:

brew install lastpass-cli --with-pinentry --with-doc

With MacPorts

sudo port selfupdate
  • Install the lastpass-cli port:
sudo port install lastpass-cli
  • Optionally install the documentation:
sudo port install lastpass-cli-doc

Manually

Install the packages listed in the Dependencies section of this document, and then follow instructions in the 'Building' section.

Installing on FreeBSD

  • Install the binary package:
sudo pkg install security/lastpass-cli
  • Or build the port yourself:
sudo make -C /usr/ports/security/lastpass-cli all install clean

Installing on Cygwin

  • Install apt-cyg
  • Using apt-cyg, install the needed build dependencies, and then follow instructions in the 'Building' section.
apt-cyg install wget make cmake gcc-core gcc-g++ openssl-devel libcurl-devel libxml2-devel libiconv-devel cygutils-extra

Building

$ make

Under the covers, make invokes cmake in a build directory; you may also use cmake directly if you need more control over the build process.

Installing

$ sudo make install

These environment variables can be passed to make to do the right thing: PREFIX, DESTDIR, BINDIR, LIBDIR, MANDIR.

Running

If you've installed it:

$ lpass

Otherwise, from the build directory:

$ ./lpass

Documentation

Install asciidoc and xsltproc if they are not already installed.

$ sudo apt-get install asciidoc xsltproc

The install-doc target builds and installs the documentation.

$ sudo make install-doc

Once installed,

$ man lpass

You can view the full documentation in the manpage, man lpass or view it online.