# 使用 Homebrew 安装 bazel-diff

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

## 安装

```sh
sudo av install brew:bazel-diff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bazel-diff
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:bazel-diff
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/bazel-diff>
- **版本:** 31.3.2
- **来源摘要:** Performs Bazel Target Diffing between two revisions in Git
- **主页:** <https://github.com/Tinder/bazel-diff/>
- **仓库:** <https://github.com/Tinder/bazel-diff>
- **上游文档:** <https://github.com/Tinder/bazel-diff#readme>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://github.com/Tinder/bazel-diff/archive/refs/tags/v31.3.2.tar.gz>
- **最后更新:** 2026-07-08T03:19:16Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- bazel-diff (cli)
- bazel-diff (别名)

## 依赖

- openjdk

## 构建依赖

- bazel

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 31.3.2
- 管理器更新时间: 2026-07-08
- 本地数据: OK
- 上游仓库: https://github.com/Tinder/bazel-diff
- 检测到的最新版本: v31.3.2 (当前)
## 项目历史与用法

bazel-diff is Tinder's command-line utility for computing the Bazel targets affected between two Git revisions, letting CI systems build or test the precise changed target set instead of rerunning an entire monorepo.

### 项目历史

The upstream repository begins in September 2020 with a v1.0-era implementation of Bazel target diffing. Its README frames the project as an answer to a gap in Bazel itself, pointing to the long-running Bazel feature request for native target diffing and to a BazelCon talk as design inspiration.

The tool's implementation history is tied to very large Bazel graphs: the README calls out streamed protobuf query output, avoidance of long command-line query lists, support for renamed/deleted/modified files, and testing against projects with tens of thousands of targets.

### 采用历史

Adoption is strongest among Bazel monorepo users who need deterministic affected-target selection for pull-request CI. The Homebrew formula packages it as a standalone CLI, making it accessible outside the original Tinder repository.

Later README additions describe an experimental HTTP query service and cached hash generation, showing a shift from one-shot local comparison toward always-on CI infrastructure for large repositories.

### 使用方式

A typical workflow checks out a base revision, generates Bazel graph hashes, checks out a final revision, generates hashes again, and runs get-impacted-targets to emit the changed target labels as JSON.

The tool is used when correctness matters more than approximate file globs: its docs explicitly warn that incorrect affected-test selection erodes trust in green-to-red CI transitions.

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

For package-history nerds, bazel-diff is a good example of the post-Bazel ecosystem filling operational gaps around monorepo CI rather than replacing Bazel itself.

It also illustrates why Bazel-adjacent packages often matter more as automation primitives than as developer-facing build tools: the interesting artifact is the affected-target JSON consumed by CI.

### 时间线

- 2020-09: Upstream git history starts with the initial v1.0-era bazel-diff code.
- 2020s: Homebrew packages bazel-diff as a standalone CLI for macOS and Linux users.
- 2020s: README-documented features expand to build graph distance metrics and an experimental long-running query service.

### Related projects

- Bazel supplies the query and build graph model that bazel-diff analyzes.
- Aspect's impacted command is documented by bazel-diff as a Starlark/Aspect CLI way to expose a similar impacted-target workflow.
- Bazelisk is commonly paired with bazel-diff in CI so the Bazel binary used for graph hashing matches the workspace's pinned version.

### 来源

- Upstream git history for https://github.com/Tinder/bazel-diff starts in September 2020.
- <https://github.com/Tinder/bazel-diff#readme documents origins, use cases, impacted-target workflow, scale notes, and related Bazel feature request.>
- source_facts.package-manager-url records the Homebrew packaging surface.


## 安全说明

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


## 源数据库详情

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


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [openjdk](https://www.automicvault.com/zh-hans/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [bazel](https://www.automicvault.com/zh-hans/pkg/brew/bazel/) - Build dependency declared by Homebrew.
- [diff-so-fancy](https://www.automicvault.com/zh-hans/pkg/brew/diff-so-fancy/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [diffnav](https://www.automicvault.com/zh-hans/pkg/brew/diffnav/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [diffr](https://www.automicvault.com/zh-hans/pkg/brew/diffr/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [difftastic](https://www.automicvault.com/zh-hans/pkg/brew/difftastic/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [difi](https://www.automicvault.com/zh-hans/pkg/brew/difi/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [git-delta](https://www.automicvault.com/zh-hans/pkg/brew/git-delta/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [git-split-diffs](https://www.automicvault.com/zh-hans/pkg/brew/git-split-diffs/) - Shares av.db curated category or tags: cli, developer-tools, diff, git.
- [aicommit](https://www.automicvault.com/zh-hans/pkg/brew/aicommit/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [bazel-remote](https://www.automicvault.com/zh-hans/pkg/brew/bazel-remote/) - Package names and metadata indicate a similar tool family. Shared terms: bazel, cli, developer, developer-tools.
- [openapi-diff](https://www.automicvault.com/zh-hans/pkg/brew/openapi-diff/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, diff, openjdk.

## Combined YAML source

View the package source record on GitHub. [combined/bazel-diff.yml](https://github.com/automic-vault/db/blob/main/combined/bazel-diff.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
