# 使用 Homebrew Cask 安装 1password-cli

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

## 安装

```sh
sudo av install cask:1password-cli
```

## 代理安全回答

1password-cli brokers access to secrets and vault items from local workflows.

- **凭据访问:** Can read secrets, documents, and account metadata after authentication.
- **远程变更:** Can edit vault items and service-account-backed secret state.
- **发布/制品风险:** Can export or inject secrets into downstream release tools.
- **推荐控制:** Gate item reads, exports, edits, and service-account token use.
- **代理使用指南:** Allow metadata inspection only; require approval for secret reads or item mutations.

其他安装命令:

### macOS

- Homebrew Cask (100%):

```sh
brew install --cask 1password-cli
```

  证据: local Homebrew cask metadata

## 软件包事实

- **软件包键:** cask:1password-cli
- **软件包管理器:** Homebrew Cask
- **版本:** 2.38.1
- **来源摘要:** Command-line interface for 1Password
- **主页:** <https://developer.1password.com/docs/cli>
- **最后更新:** 2026-07-30T21:48:56Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- op (二进制)
- op (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

1Password CLI is the official op command for using 1Password from a terminal, scripts, and developer workflows.

### 项目历史

The official get-started documentation describes 1Password CLI as bringing 1Password to the terminal, with installation paths for macOS, Windows, and Linux and integration with the desktop app for local authentication.

1Password's official CLI 2 release notes show an actively maintained product-history stream for the modern CLI, including package installer changes, desktop app integration fixes, shell plugin work, and Docker tag behavior after CLI 1 deprecation.

### 采用历史

CLI adoption is tied to developer and operations workflows: Homebrew, winget, manual installs, Docker images, shell plugins, scripts, and desktop-app-backed authentication are all documented official distribution or usage paths.

### 使用方式

Users run op to sign in, manage vault items, retrieve secrets, automate scripts, and integrate 1Password with shell and development workflows. The configuration directory can be controlled with --config or OP_CONFIG_DIR, otherwise it follows documented XDG and legacy directory precedence.

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

For package maintainers, 1Password CLI is notable because the Homebrew cask wraps a proprietary vendor-distributed binary, while the install docs state the cask is maintained by both Homebrew and 1Password developers and downloads from AgileBits/1Password CDN domains.

### 时间线

- 2020s: 1Password CLI 2 becomes the actively maintained CLI line documented by the official CLI2 release notes.
- 2020s: Official install docs document Homebrew, winget, Linux package managers, manual downloads, and desktop app integration.
- 2025: CLI 2 release notes mention Docker tag behavior following CLI 1 deprecation.

### Related projects

- Related official surfaces include the 1Password desktop apps, 1Password Connect, shell plugins, Docker images, and the Homebrew Cask packaging repository.

### 来源

- <https://app-updates.agilebits.com/product_history/CLI2>
- <https://www.1password.dev/cli/config-directories.md>
- <https://www.1password.dev/cli/get-started.md>
- <https://www.1password.dev/cli/reference>


## 安全说明

没有找到 1password-cli 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## 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: ${XDG_CONFIG_HOME}/op, ~/.config/op, ~/.op, ${XDG_CONFIG_HOME}/.op
## 其他软件包管理器记录

- Nix - _1password-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/_1/_1password-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - 1password-cli: normalized package name match | MacPorts ports tree: security/1password-cli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/1password-cli: normalized package name match | Scoop official bucket manifest trees: bucket/1password-cli.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - AgileBits.1Password.CLI: normalized package name match | Windows Package Manager source index: AgileBits.1Password.CLI from https://cdn.winget.microsoft.com/cache/source.msix
- Chocolatey - op: installed executable or alias match | Chocolatey community package catalog: op from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','nvs'


## Combined YAML source

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


## 来源

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