LastPass command line interface tool
Clone or download
Latest commit df182dd Jun 15, 2018
Permalink
Failed to load latest commit information.
cmake_extras build: fix install-doc on OSX Jan 3, 2017
contrib Update dependencies for Debian stable/testing Jun 12, 2018
debian Preparing release 1.3.1 May 17, 2018
test tests: rename note-with-notes test to what it does Mar 15, 2018
.dockerignore Add Dockerfile to create a clean build environment Mar 31, 2018
.editorconfig Add .editorconfig file Mar 16, 2018
.gitignore Added CLion project files to ignore list Mar 15, 2018
.travis.yml run tests under travis Feb 17, 2017
CHANGELOG.md Preparing release 1.3.1 May 17, 2018
CMakeLists.txt tests: rename note-with-notes test to what it does Mar 15, 2018
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 Update dependencies for Debian stable/testing Jun 12, 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 import: optionally preserve duplicate accounts Jan 9, 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 json-format: rename to dash instead of underscore Mar 13, 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 show: teach show --json option Mar 13, 2018
config.c Running 'make test' fails on OpenBSD. May 18, 2018
config.h config: support XDG base directory specification Jul 18, 2016
edit.c edit: fix editing of site notes Mar 14, 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
json-format.c json-format: rename to dash instead of underscore Mar 13, 2018
json-format.h json-format: rename to dash instead of underscore Mar 13, 2018
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 show: teach show --json option Mar 13, 2018
lpass.c Set action on lpass help preventing a fallthrough Mar 16, 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 #314 Allow providing custom path to pinentry Jan 11, 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 Revert "pins: remove GlobalSign R1/R3 pins" May 16, 2018
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 upload: don't backoff as much for 500 errors Mar 13, 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 Bump version to 1.3.2 Jun 11, 2018
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 gcc gcc-c++ make cmake

Debian/Ubuntu

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

  • For Debian (stable/oldstable) and Ubuntu < 18.04

apt-get --no-install-recommends -yqq install \
  bash-completion \
  build-essential \
  cmake \
  libcurl3  \
  libcurl3-openssl-dev  \
  libssl1.0 \
  libssl1.0-dev \
  libxml2 \
  libxml2-dev  \
  pkg-config \
  ca-certificates \
  xclip
  • For Debian (testing/experimental) and Ubuntu >= 18.04
apt-get --no-install-recommends -yqq install \
  bash-completion \
  build-essential \
  cmake \
  libcurl4  \
  libcurl4-openssl-dev  \
  libssl-dev  \
  libxml2 \
  libxml2-dev  \
  libssl1.1 \
  pkg-config \
  ca-certificates \
  xclip

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

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.