# 使用 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/lastpass-cli>
- **版本:** 1.6.1
- **来源摘要:** LastPass command-line interface tool
- **主页:** <https://github.com/lastpass/lastpass-cli>
- **仓库:** <https://github.com/lastpass/lastpass-cli>
- **许可证:** GPL-2.0-or-later WITH openvpn-openssl-exception
- **源码归档:** <https://github.com/lastpass/lastpass-cli/releases/download/v1.6.1/lastpass-cli-1.6.1.tar.gz>
- **最后更新:** 2026-06-24T13:25:45+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- lpass (cli)
- lpass (别名)

## 依赖

- curl
- openssl@3
- pinentry

## 构建依赖

- asciidoc
- cmake
- docbook-xsl
- pkgconf

## macOS 提供的库

- libxml2
- libxslt

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.6.1
- 管理器更新时间: 2026-06-24
- 本地数据: OK
- 上游仓库: https://github.com/lastpass/lastpass-cli
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lastpass-cli
- **Version Scheme:** 0
- **Revision:** 3
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [curl](https://pkg.so/zh-hans/brew/curl/) - Runtime dependency declared by Homebrew.
- [pinentry](https://pkg.so/zh-hans/brew/pinentry/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [docbook-xsl](https://pkg.so/zh-hans/brew/docbook-xsl/) - Build dependency declared by Homebrew.
- [asciidoc](https://pkg.so/zh-hans/brew/asciidoc/) - Build dependency declared by Homebrew.
- [pass](https://pkg.so/zh-hans/brew/pass/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [rbw](https://pkg.so/zh-hans/brew/rbw/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [pass-import](https://pkg.so/zh-hans/brew/pass-import/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [kpcli](https://pkg.so/zh-hans/brew/kpcli/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [enpass-cli](https://pkg.so/zh-hans/brew/enpass-cli/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [prs](https://pkg.so/zh-hans/brew/prs/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [clipsafe](https://pkg.so/zh-hans/brew/clipsafe/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [pwsafe](https://pkg.so/zh-hans/brew/pwsafe/) - Shares pkgdb curated category or tags: cli, password-management, password-manager, security.
- [gopass-jsonapi](https://pkg.so/zh-hans/brew/gopass-jsonapi/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, manager, password, password-manager, secrets.

## 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
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
