# buildifier を Homebrew, Nix でインストール

buildifier のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:buildifier
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install buildifier
```

  証拠: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#buildifier
```

  証拠: nixpkgs package indexes: buildifier from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## パッケージ情報

- **パッケージキー:** brew:buildifier
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/buildifier>
- **バージョン:** 8.5.1
- **ソース概要:** Format bazel BUILD files with a standard convention
- **ホームページ:** <https://github.com/bazelbuild/buildtools>
- **リポジトリ:** <https://github.com/bazelbuild/buildtools>
- **ライセンス:** Apache-2.0
- **ソースアーカイブ:** <https://github.com/bazelbuild/buildtools/archive/refs/tags/v8.5.1.tar.gz>
- **最終更新:** 2026-07-25T14:19:44-04:00
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- buildifier (cli)
- buildifier (エイリアス)

## ビルド依存関係

- go

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 8.5.1
- マネージャ更新日: 2026-07-25
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/bazelbuild/buildtools
- 検出された最新: v8.5.1 (最新)
## プロジェクトの歴史と使われ方

Buildifier is the Bazel ecosystem's standard formatter and linter for BUILD, WORKSPACE, MODULE.bazel, `.bzl`, and other Starlark-related files.

### プロジェクトの歴史

Buildifier is part of the bazelbuild/buildtools repository, which collects developer tools for working with Google's Bazel build tool. The repository also includes related tools such as Buildozer and unused_deps.

Its role is deliberately analogous to source-code formatters such as clang-format: it gives Bazel and Starlark files a standard convention and can also report or fix lint warnings.

### 採用の歴史

Buildifier became common wherever Bazel is used seriously because BUILD and `.bzl` files are code-like inputs that benefit from deterministic formatting in review and CI. The tool is packaged by Homebrew and Nix according to the input and can also be installed with Go or run through Bazel rules.

Its adoption is tied directly to Bazel's adoption: monorepos and polyglot builds that standardize on Bazel often add Buildifier to presubmit checks so build metadata stays consistent.

### 使われ方

Basic usage is `buildifier path/to/file`; recursive formatting uses `buildifier -r path/to/dir`. The README documents file-type detection for BUILD, WORKSPACE, `.bzl`, MODULE, and default Starlark files, with `--type` overrides for stdin or unusual filenames.

The integrated linter runs with `--lint=warn` or `--lint=fix`, and machine-readable diagnostics are available with JSON output in check mode.

### パッケージ好きにとっての重要性

Buildifier is significant because it formats package/build metadata rather than application source. For Bazel users, BUILD files are the package graph, so a stable formatter lowers merge noise and makes automated rewrites safer.

It also sits beside Buildozer: Buildifier normalizes and checks files, while Buildozer edits them programmatically, together forming a small maintenance toolkit for large Bazel workspaces.

### タイムライン

- 2010s: Buildifier developed inside the Bazel buildtools repository as Bazel's Starlark formatting tool.
- 2020s: buildtools releases continued through major versions and Buildifier gained broader linting and JSON diagnostic workflows.
- 2020s: Installation paths included Go module installation, Bazel rules, Homebrew, and Nix packages.

### Related projects

- Bazel is the build system whose BUILD, WORKSPACE, MODULE.bazel, and Starlark files Buildifier formats.
- Buildozer is the companion buildtools utility for command-line edits to Bazel files.
- unused_deps is another buildtools utility for Java dependency cleanup.

### ソース

- <https://github.com/bazelbuild/buildtools>
- <https://github.com/bazelbuild/buildtools/blob/main/buildifier/README.md>
- source_facts.package-manager


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** buildifier
- **Version Scheme:** 0
- **Revision:** 0
- **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 - buildifier: normalized package name match | nixpkgs package indexes: buildifier from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://pkg.so/ja/brew/go/) - Build dependency declared by Homebrew.
- [buildozer](https://pkg.so/ja/brew/buildozer/) - Shares the same upstream source repository.
- [shfmt](https://pkg.so/ja/brew/shfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [astyle](https://pkg.so/ja/brew/astyle/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [oxfmt](https://pkg.so/ja/brew/oxfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [air](https://pkg.so/ja/brew/air/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [beautysh](https://pkg.so/ja/brew/beautysh/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [dfmt](https://pkg.so/ja/brew/dfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [js-beautify](https://pkg.so/ja/brew/js-beautify/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [mdformat](https://pkg.so/ja/brew/mdformat/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, formatters.
- [perfectionist](https://pkg.so/ja/npm/perfectionist/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, files, format.
- [prettier-standard](https://pkg.so/ja/npm/prettier-standard/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, formatter, formatters.

## Combined YAML source

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


## ソース

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
