# 使用 Homebrew, apk, dnf, MacPorts, Nix, apt 安装 lastpass-cli

查看 lastpass-cli 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lastpass-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lastpass-cli
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lastpass-cli
```

  证据: MacPorts ports tree: security/lastpass-cli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add lastpass-cli
```

  证据: Alpine Linux edge package indexes: lastpass-cli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install lastpass-cli
```

  证据: Fedora Rawhide package metadata: lastpass-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lastpass-cli
```

  证据: nixpkgs package indexes: pkgs/by-name/la/lastpass-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- Ubuntu apt (92%):

```sh
sudo apt install lastpass-cli
```

  证据: Ubuntu 24.04 LTS package indexes: lastpass-cli from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

## 软件包事实

- **软件包键:** brew:lastpass-cli
- **软件包管理器:** Homebrew
- **版本:** 1.6.1
- **来源摘要:** LastPass command-line interface tool
- **主页:** <https://github.com/lastpass/lastpass-cli>
- **仓库:** <https://github.com/lastpass/lastpass-cli>
- **最后更新:** 2026-06-24T13:25:45+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lpass (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.6.1
## 项目历史与用法

LastPass CLI is the official open-source command-line client for LastPass vault data. It gives terminal users the `lpass` command for listing, showing, generating, adding, editing, and syncing secrets without using the browser extension or web UI.

### 项目历史

LastPass announced the open-sourced command-line application on 2014-10-22, the same date recorded as the GitHub repository creation date. The README identifies the project as a LastPass.com command-line interface and carries a 2014-2019 LastPass copyright notice.

The project was designed for GNU/Linux, Cygwin, and Mac OS X, with dependencies such as OpenSSL or LibreSSL, libcurl, libxml2, and optional clipboard helpers. Its manpage-oriented documentation and `make install-doc` target reflect a Unix command-line packaging style rather than an app-store distribution model.

### 采用历史

Package adoption followed quickly in Unix ecosystems. The README documents installation through Arch, Fedora, EPEL, Debian/Ubuntu build dependencies, Gentoo, Homebrew, MacPorts, FreeBSD ports, and Cygwin, making `lpass` a common terminal bridge for LastPass users on developer workstations and servers.

From a package-manager perspective, LastPass CLI is notable because it packages a proprietary SaaS password manager workflow as a conventional open-source CLI with shell completion, manpages, and data/cache locations that can be managed by Unix package systems.

### 使用方式

Typical use starts with `lpass login`, then commands such as `lpass ls`, `lpass show`, `lpass generate`, `lpass edit`, and clipboard-oriented password retrieval. The documented storage paths include encrypted vault blobs and session tokens, so the tool sits directly in the secrets-management path for shell scripts and interactive terminal use.

### 为什么软件包爱好者会关心

LastPass CLI matters to package nerds because it is a real-world example of a vendor SaaS client being distributed like a normal Unix utility: source on GitHub, package recipes across distributions, optional manpage generation, and XDG-style data/config support.

It also exposed the tension around packaging cloud credentials locally: the package is small and scriptable, but its cached blob and session token files are security-sensitive runtime state rather than ordinary configuration.

### 时间线

- 2014-10-22: LastPass announced and open-sourced the command-line application.
- 2014-10-22: GitHub repository created.
- 2019-04-15: v1.3.3 release published.
- 2024-11-14: v1.6.1 release published.

### Related projects

- Related pieces include the LastPass web service, LastPass browser extensions, pinentry, libcurl, libxml2, OpenSSL or LibreSSL, and platform clipboard tools such as xclip, xsel, pbcopy, and Cygwin putclip.

### 来源

- <https://api.github.com/repos/lastpass/lastpass-cli>
- <https://api.github.com/repos/lastpass/lastpass-cli/releases?per_page=10>
- <https://blog.lastpass.com/posts/open-sourced-lastpass-command-line-application-now-available>
- <https://github.com/lastpass/lastpass-cli>
- <https://raw.githubusercontent.com/lastpass/lastpass-cli/master/README.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $LPASS_HOME/env, $XDG_CONFIG_HOME/lpass/env, ~/.lpass/env

## Credential files

- Unix: $LPASS_HOME/blob, $LPASS_HOME/session_token, $XDG_DATA_HOME/lpass/blob, $XDG_DATA_HOME/lpass/session_token, ~/.lpass/blob, ~/.lpass/session_token
## 其他软件包管理器记录

- Nix - lastpass-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/la/lastpass-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lastpass-cli - 1.3.7-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: lastpass-cli from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line interface to LastPass.com | https://github.com/lastpass/lastpass-cli
- apk - lastpass-cli - 1.6.1-r1: normalized package name match | Alpine Linux edge package indexes: lastpass-cli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LastPass command line interface tool | https://lastpass.com/
- apk - lastpass-cli-bash-completion - 1.6.1-r1: normalized package name match | Alpine Linux edge package indexes: lastpass-cli-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for lastpass-cli | https://lastpass.com/
- apk - lastpass-cli-doc - 1.6.1-r1: normalized package name match | Alpine Linux edge package indexes: lastpass-cli-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LastPass command line interface tool (documentation) | https://lastpass.com/
- apk - lastpass-cli-fish-completion - 1.6.1-r1: normalized package name match | Alpine Linux edge package indexes: lastpass-cli-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for lastpass-cli | https://lastpass.com/
- apk - lastpass-cli-zsh-completion - 1.6.1-r1: normalized package name match | Alpine Linux edge package indexes: lastpass-cli-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for lastpass-cli | https://lastpass.com/
- dnf - lastpass-cli - 1.6.1-6.fc45: normalized package name match | Fedora Rawhide package metadata: lastpass-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Command line interface to LastPass.com | https://github.com/LastPass/lastpass-cli
- MacPorts - lastpass-cli: normalized package name match | MacPorts ports tree: security/lastpass-cli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/lastpass-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lastpass-cli.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
