# google-java-format を Homebrew, MacPorts, Nix, scoop でインストール

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

## インストール

```sh
sudo av install brew:google-java-format
```

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

### macOS

- Homebrew (100%):

```sh
brew install google-java-format
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install google-java-format
```

  証拠: MacPorts ports tree: java/google-java-format/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#google-java-format
```

  証拠: nixpkgs package indexes: pkgs/by-name/go/google-java-format/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install extras/google-java-format
```

  証拠: Scoop official bucket manifest trees: bucket/google-java-format.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:google-java-format
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/google-java-format>
- **バージョン:** 1.36.1
- **ソース概要:** Reformats Java source code to comply with Google Java Style
- **ホームページ:** <https://github.com/google/google-java-format>
- **リポジトリ:** <https://github.com/google/google-java-format>
- **ライセンス:** Apache-2.0
- **ソースアーカイブ:** <https://github.com/google/google-java-format/releases/download/v1.36.1/google-java-format-1.36.1-all-deps.jar>
- **最終更新:** 2026-07-30T20:58:59Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- google-java-format (cli)
- google-java-format-diff (cli)
- google-java-format (エイリアス)
- google-java-format-diff (エイリアス)

## 依存関係

- openjdk

## macOS 提供ライブラリ

- python

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 all

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 1.36.1
- マネージャ更新日: 2026-07-30
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/google/google-java-format
- 情報: No cached GitHub release or tag data was available.
## プロジェクトの歴史と使われ方

google-java-format is Google's command-line and library implementation of the Google Java Style formatter. The project deliberately avoids user-configurable formatting rules so Java code can be normalized to one Google style across editors, builds, and scripts.

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

Google opened the GitHub repository in May 2015 and published a 0.1 Alpha release in November 2015. The 1.0 release followed in April 2016, establishing the formatter as a packaged tool rather than only an internal style convention.

The README describes several integration surfaces around the same formatter engine: a command-line jar or native binary, a diff-oriented helper script, JetBrains and Eclipse plugins, and use as a Java library from Maven or Gradle builds. That shape made the project useful both for individual developer machines and for automated formatting checks.

### 採用の歴史

Adoption grew through the Java tooling ecosystem because the formatter is intentionally prescriptive. The official README lists third-party integrations for Visual Studio Code, Gradle, Maven, SBT, and GitHub Actions, showing how package maintainers and build-tool authors wrapped the same formatter for their own workflows.

Package-manager adoption followed the CLI packaging model: Homebrew, MacPorts, Nix, and Scoop package the formatter so users can run `google-java-format` or `google-java-format-diff` without hand-managing the release jar.

### 使われ方

The common package-manager use is formatting whole Java files from the shell, rewriting files in place with `--replace`, checking changed lines with the diff helper, or enforcing style in CI with a nonzero exit when files differ. The library mode supports code generators and build tools that need formatted Java output.

The formatter depends on javac internals through the `jdk.compiler` module, so editor and library integrations document extra JVM export flags on strongly encapsulated JDKs.

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

google-java-format matters to package nerds because it packages a style guide as executable policy. It is a canonical example of a formatter with almost no bikeshed surface: installation, editor integration, and CI wiring matter more than local configuration.

It also sits at the intersection of Java release engineering and package distribution: jars, native binaries, IDE plugins, Maven artifacts, and OS package-manager formulae all expose the same opinionated formatting behavior.

### タイムライン

- 2015: GitHub repository created under google/google-java-format.
- 2015: 0.1 Alpha published on GitHub Releases.
- 2016: 1.0 release published on GitHub Releases.
- 2017: 1.x releases added a steady release cadence for package managers and editor integrations.
- 2021: JDK strong encapsulation made the documented `--add-exports` flags important for plugin and library users.

### Related projects

- The README points to Google Java Style, the IntelliJ and Eclipse plugins, google-java-format-diff, Spotless Gradle and Maven integrations, fmt-maven-plugin, sbt-java-formatter, and GitHub Actions wrappers.

### ソース

- <https://api.github.com/repos/google/google-java-format>
- <https://github.com/google/google-java-format>
- <https://github.com/google/google-java-format#readme>
- <https://github.com/google/google-java-format/releases>


## セキュリティノート

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:** google-java-format
- **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

## 他のパッケージマネージャ記録

- Nix - google-java-format: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/google-java-format/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - google-java-format: normalized package name match | MacPorts ports tree: java/google-java-format/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - extras/google-java-format: normalized package name match | Scoop official bucket manifest trees: bucket/google-java-format.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## 関連リンク

- [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.
- [openjdk](https://pkg.so/ja/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [pmd](https://pkg.so/ja/brew/pmd/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, java.
- [astyle](https://pkg.so/ja/brew/astyle/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, java.
- [checkstyle](https://pkg.so/ja/brew/checkstyle/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, java.
- [air](https://pkg.so/ja/brew/air/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, formatter.
- [spotbugs](https://pkg.so/ja/brew/spotbugs/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, java.
- [alejandra](https://pkg.so/ja/brew/alejandra/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, formatter.
- [xcbeautify](https://pkg.so/ja/brew/xcbeautify/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [swiftlint](https://pkg.so/ja/brew/swiftlint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools.
- [scalariform](https://pkg.so/ja/brew/scalariform/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, formatter.
- [dockerfile-utils](https://pkg.so/ja/npm/dockerfile-utils/) - Local package facts share a topical domain. Shared terms: cli, code, code-quality, developer, developer-tools.
- [esformatter](https://pkg.so/ja/npm/esformatter/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, format.

## Combined YAML source

View the package source record on GitHub. [combined/google-java-format.yml](https://github.com/mxcl/pkgdb/blob/main/combined/google-java-format.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
