# 使用 Homebrew, chocolatey, MacPorts, Nix, pacman, scoop, winget 安装 bazelisk

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

## 安装

```sh
sudo av install brew:bazelisk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bazelisk
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bazelisk
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#bazelisk
```

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

- pacman (92%):

```sh
sudo pacman -S bazelisk
```

  证据: Arch Linux sync databases: bazelisk from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Chocolatey (92%):

```sh
choco install bazelisk
```

  证据: Chocolatey community package catalog: bazelisk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','backupper-standard'

- Scoop (92%):

```sh
scoop install main/bazelisk
```

  证据: Scoop official bucket manifest trees: bucket/bazelisk.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Bazel.Bazelisk -e
```

  证据: Windows Package Manager source index: Bazel.Bazelisk from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:bazelisk
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/bazelisk>
- **版本:** 1.29.0
- **来源摘要:** User-friendly launcher for Bazel
- **主页:** <https://github.com/bazelbuild/bazelisk/>
- **仓库:** <https://github.com/bazelbuild/bazelisk>
- **上游文档:** <https://github.com/bazelbuild/bazelisk#readme>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/bazelbuild/bazelisk/archive/refs/tags/v1.29.0.tar.gz>
- **最后更新:** 2026-04-27T22:09:13Z
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- bazelisk (cli)
- bazelisk (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.29.0
- 管理器更新时间: 2026-04-27
- 本地数据: OK
- 上游仓库: https://github.com/bazelbuild/bazelisk
- 检测到的最新版本: v1.29.0 (当前)
## 项目历史与用法

Bazelisk is the Bazel launcher and version manager that makes Bazel behave like a repo-pinned toolchain: it chooses, downloads, verifies, and runs the Bazel version requested by the current workspace.

### 项目历史

The bazelbuild/bazelisk repository begins in September 2018 with a Python script, and the README notes that Bazelisk was later rewritten in Go. The maintained Go version is now the documented implementation.

Bazelisk's core model is intentionally simple: it can be invoked as bazel or bazelisk, reads USE_BAZEL_VERSION, .bazeliskrc, .bazelversion, or fallback settings, downloads official Bazel releases or forked releases, then passes arguments through to the selected Bazel binary.

### 采用历史

Bazelisk became common because Bazel workspaces are sensitive to major-version changes, incompatible flags, and migration timing. A checked-in .bazelversion lets teams upgrade Bazel atomically with the source changes needed for that upgrade.

The input records Bazelisk packaging across Homebrew, Chocolatey, MacPorts, Nix, Arch, Scoop, winget, and zypper, and the README also documents npm distribution for frontend developers.

### 使用方式

Developers install Bazelisk as bazel on PATH, check a .bazelversion file into the repository, and let Bazelisk download and run the matching Bazel binary on laptops and CI.

Advanced workflows use .bazeliskrc and environment variables for custom release mirrors, SHA256 verification, forked Bazel releases, GitHub tokens, migration runs, bisecting Bazel versions, and wrapper scripts under tools/bazel.

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

Bazelisk is package-nerd significant because it separates the package-manager-installed launcher from the project-selected compiler/build-tool version, similar in spirit to nvm-style runtime management.

It is also the practical glue that makes versioned Bazel formulas less painful: repositories can declare their expected Bazel line while users keep one stable launcher installed.

### 时间线

- 2018-09: Upstream git history starts with a Python bazelisk implementation.
- 2018-10: Early commits implement lookup of the latest Bazel release.
- 2020s: The README documents the maintained Go rewrite, .bazelversion and .bazeliskrc selection, fork support, verification, --migrate, and --bisect.
- 2020s: Package managers distribute Bazelisk as both bazelisk and bazel for drop-in Bazel launching.

### Related projects

- Bazel is the binary Bazelisk selects and executes.
- bazel@7 and bazel@8 are versioned package-manager alternatives, while Bazelisk lets a workspace choose those or newer upstream releases dynamically.
- bazel-diff and bazel-remote CI setups often benefit from Bazelisk because graph hashing and remote-cache behavior should use the workspace's intended Bazel version.

### 来源

- Upstream git history for https://github.com/bazelbuild/bazelisk starts in September 2018.
- <https://github.com/bazelbuild/bazelisk#readme documents Bazelisk's launcher purpose, Python-to-Go history, version selection, .bazelversion, .bazeliskrc, downloads, auth, --migrate, and --bisect.>
- source_facts.package-manager records cross-package-manager availability.


## 安全说明

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: $workspace/.bazeliskrc, $workspace/.bazelversion

## Credential files

- Unix: ~/.netrc
## 源数据库详情

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

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

- Nix - bazelisk: normalized package name match | nixpkgs package indexes: pkgs/by-name/ba/bazelisk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - bazelisk - 1.29.0-1: normalized package name match | Arch Linux sync databases: bazelisk from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A user-friendly launcher for Bazel. | https://github.com/bazelbuild/bazelisk
- MacPorts - bazelisk: normalized package name match | MacPorts ports tree: devel/bazelisk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - bazelisk: normalized package name match | Chocolatey community package catalog: bazelisk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','backupper-standard'
- Scoop - main/bazelisk: normalized package name match | Scoop official bucket manifest trees: bucket/bazelisk.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Bazel.Bazelisk: normalized package name match | Windows Package Manager source index: Bazel.Bazelisk from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [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.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Build dependency declared by Homebrew.
- [bazel-diff](https://www.automicvault.com/zh-hans/pkg/brew/bazel-diff/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [bazel-remote](https://www.automicvault.com/zh-hans/pkg/brew/bazel-remote/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [buildifier](https://www.automicvault.com/zh-hans/pkg/brew/buildifier/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [buildozer](https://www.automicvault.com/zh-hans/pkg/brew/buildozer/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [dmenu](https://www.automicvault.com/zh-hans/pkg/brew/dmenu/) - Shares av.db curated category or tags: cli, developer-tools, launcher.
- [gflags](https://www.automicvault.com/zh-hans/pkg/brew/gflags/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [ibazel](https://www.automicvault.com/zh-hans/pkg/brew/ibazel/) - Shares av.db curated category or tags: bazel, cli, developer-tools.
- [python-launcher](https://www.automicvault.com/zh-hans/pkg/brew/python-launcher/) - Shares av.db curated category or tags: cli, developer-tools, launcher.
- [oauth2c](https://www.automicvault.com/zh-hans/pkg/brew/oauth2c/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, friendly, user.
- [vgrep](https://www.automicvault.com/zh-hans/pkg/brew/vgrep/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, friendly, user.

## Combined YAML source

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


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
