Command line interface to LastPass.com.
lpass is designed to run on GNU/Linux, Cygwin and Mac OS X.
- LibreSSL or OpenSSL
- libcurl
- libxml2
- CMake 3.10 or newer and pkg-config (build-time only)
- pinentry (optional)
- AsciiDoc (build-time documentation generation only)
- xclip, xsel, pbcopy, or putclip from cygutils-extra for clipboard support (optional)
- A binary package is available from the community repository, use pacman to simple install lastpass-cli.
- Can be build from source with the "lastpass-cli-git" *Arch User Repository (AUR). Information about installing packages from the AUR can be found on the Arch wiki.
# from community repository
sudo pacman -S lastpass-cli
# from AUR repository
packer -S lastpass-cli-git
- Packages are available in Fedora 22 and later.
sudo dnf install lastpass-cli
- Packages are available in EPEL for RHEL/CentOS 7 and later.
sudo yum install lastpass-cli
- To build from source: 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
- Install the needed build dependencies, and then follow instructions in the 'Building' section. Requires CMake 3.10 or newer (Debian 10+, Ubuntu 18.04+).
apt-get --no-install-recommends -yqq install \
bash-completion \
build-essential \
cmake \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
pkg-config \
ca-certificates \
xclip
- Install the package:
sudo emerge lastpass-cli
Install the packages listed in the Dependencies section of this document, and then follow instructions in the 'Building' section.
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
- Install MacPorts, if necessary.
- Update MacPorts' local ports tree:
sudo port selfupdate
- Install the lastpass-cli port:
sudo port install lastpass-cli
- Optionally install the documentation:
sudo port install lastpass-cli-doc
macOS ships libcurl and libxml2 but no OpenSSL headers. Install the build dependencies with Homebrew, then follow the 'Building' and 'Installing' sections:
brew install cmake pkgconf openssl
On macOS, make install defaults to PREFIX=/usr/local (/usr is read-only
under System Integrity Protection).
If CMake still can't find OpenSSL:
export OPENSSL_ROOT_DIR="$(brew --prefix openssl)"
- 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
- 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
$ 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.
$ sudo make install
These environment variables can be passed to make to do the right thing: PREFIX, DESTDIR, BINDIR, LIBDIR, MANDIR.
If you've installed it:
$ lpass
Otherwise, from the build directory:
$ ./lpass
Install asciidoc and xsltproc if they are not already installed.
$ sudo apt-get install asciidoc xsltproc
On macOS:
$ brew install asciidoc docbook-xsl
$ export XML_CATALOG_FILES="$(brew --prefix)/etc/xml/catalog"
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.