Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
LastPass command line interface tool
C Shell CMake Other
Branch: master
Clone or download
GPaulovics Merge pull request #419 from mindrunner/master
add lastpass attachment export script by @mindrunner
Latest commit 2a70884 May 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake_extras build: fix install-doc on OSX Jan 3, 2017
contrib Merge pull request #419 from mindrunner/master May 2, 2019
debian Prepare for 1.3.3 release Apr 15, 2019
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 Generate version.h file Mar 14, 2019
.travis.yml run tests under travis Feb 17, 2017
CHANGELOG.md Change credits to Wesley Schwengle for 1.3.3 release Apr 16, 2019
CMakeLists.txt Fix non-default PKG_CONFIG_PATH on macOS Apr 10, 2019
CONTRIBUTING CONTRIBUTING: clarify terms for future contributions Nov 10, 2015
COPYING Update FSF address. Nov 19, 2015
LASTPASS-VERSION-GEN Prepare for 1.3.3 release Apr 15, 2019
LICENSE.OpenSSL spelling: routines Nov 7, 2017
Makefile Remove version generation from Makefile Mar 22, 2019
README.md readme: home-brew formula doesn’t have `--with-pinentry` option. Mar 8, 2019
agent.c agent.c: create function _setup_agent_socket Apr 16, 2019
agent.h added lpass status command to get the status of the LastPass agent Jul 9, 2016
blob.c Refactor blob_load Mar 26, 2019
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 Added an error message for not having a CSV header on import Feb 12, 2019
cmd-login.c copyright: update dates to 2018 Jan 2, 2018
cmd-logout.c Fix bug where logout requires login Mar 29, 2019
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 Remove memory leak in `config_path_for_type` Mar 15, 2019
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 Force IPv4 for every curl call made to lastpass API servers Mar 20, 2019
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 Include `libgen.h` for BSD builds Mar 12, 2019
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 Fix bug where logout requires login Mar 29, 2019
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
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 Ubuntu 16.04 (xenial)

apt-get --no-install-recommends -yqq install \
  bash-completion \
  build-essential \
  cmake \
  libcurl3  \
  libcurl3-openssl-dev  \
  libssl1.0.0 \
  libssl-dev \
  libxml2 \
  libxml2-dev  \
  pkg-config \
  ca-certificates \
  xclip
  • For Debian (stable/oldstable) and other Ubuntus < 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 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.

You can’t perform that action at this time.