# include-what-you-use を Homebrew, apk, MacPorts, Nix, zypper, dnf でインストール

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

## インストール

```sh
sudo av install brew:include-what-you-use
```

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

### macOS

- Homebrew (100%):

```sh
brew install include-what-you-use
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install include-what-you-use
```

  証拠: MacPorts ports tree: devel/include-what-you-use/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add include-what-you-use
```

  証拠: Alpine Linux edge package indexes: include-what-you-use from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#include-what-you-use
```

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

- zypper (92%):

```sh
sudo zypper install include-what-you-use
```

  証拠: openSUSE Tumbleweed package metadata: include-what-you-use from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- dnf (92%):

```sh
sudo dnf install iwyu
```

  証拠: Fedora Rawhide package metadata: iwyu from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:include-what-you-use
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.26
- **ソース概要:** Tool to analyze #includes in C and C++ source files
- **ホームページ:** <https://include-what-you-use.org/>
- **リポジトリ:** <https://github.com/include-what-you-use/include-what-you-use>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- fix_includes.py (エイリアス)
- include-what-you-use (エイリアス)
- iwyu_tool.py (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.26
## プロジェクトの歴史と使われ方

Include What You Use, often abbreviated IWYU, is a Clang-based C and C++ include analyzer. It tells developers which headers a source file should include directly and which includes can be removed or replaced with forward declarations.

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

The project site announced a very-alpha 0.1 release in February 2011 and described an open-source release-early approach after Google-internal origins. Early releases tracked specific LLVM and Clang versions because IWYU depends heavily on Clang internals.

The release notes show a steady pattern: each IWYU release follows an LLVM/Clang line, updates mappings, and improves analysis of C, C++, templates, standard-library headers, and platform-specific headers. Version 0.5 in December 2015 marked migration to GitHub, updated documentation, improved testing infrastructure, and added Boost and Qt mappings.

### 採用の歴史

IWYU spread through C++ build culture because include hygiene directly affects compile time, rebuild fan-out, and refactoring safety. The official documentation explicitly frames the tool around large codebases, where transitive includes make it hard to remove dependencies safely.

Package-manager metadata in this batch lists Homebrew, Alpine, Fedora, MacPorts, Nix, and openSUSE packaging. That is a good fit for a compiler-adjacent developer tool: users install a binary matching their Clang generation and wire it into compilation databases, CMake workflows, CI, or local cleanup scripts.

### 使われ方

IWYU is usually run against source files with the same compilation information used by Clang. The companion iwyu_tool.py works with compilation databases, and fix_includes.py can apply suggested include edits.

Its output is used during dependency cleanup, code-review preparation, CI checks, and large refactors where accidental reliance on another file's transitive include would otherwise hide missing direct dependencies.

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

For package nerds, IWYU is significant because it turns a style rule into a compiler-backed CLI. It also illustrates a packaging challenge common to LLVM ecosystem tools: the useful binary has to stay aligned with Clang internals and therefore tends to move in lockstep with compiler releases.

It matters beyond neatness. Header dependency cleanup can shorten builds, reduce needless rebuilds, and make C++ packages less fragile when upstream headers change.

### タイムライン

- 2011: IWYU 0.1 announced as a very-alpha open-source release.
- 2011: Clang 2.9 and 3.0 compatible tarballs published.
- 2014: Clang 3.4 and 3.5 compatible releases published; rudimentary C support added in the 3.5-era release.
- 2015: IWYU 0.5 migrated to GitHub and added Boost and Qt mappings.
- 2019: Release notes stated that binary releases would no longer be produced and pointed users to maintained packages.
- 2026: IWYU 0.26 released for LLVM and Clang 22.

### Related projects

- LLVM and Clang are the compiler infrastructure IWYU builds on.
- fix_includes.py and iwyu_tool.py are companion tools shipped by the project.
- CMake compilation databases, clang-tidy, and C++ include-order or dependency-cleanup workflows are adjacent developer-tooling surfaces.

### ソース

- <https://api.github.com/repos/include-what-you-use/include-what-you-use/releases>
- <https://formulae.brew.sh/formula/include-what-you-use>
- <https://github.com/include-what-you-use/include-what-you-use>
- <https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md>
- <https://include-what-you-use.org/>
- input.json source_facts.package-manager


## セキュリティノート

narrow executable package without higher-risk signals.

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

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

- Nix - include-what-you-use: normalized package name match | nixpkgs package indexes: include-what-you-use from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- apk - include-what-you-use - 0.26-r0: normalized package name match | Alpine Linux edge package indexes: include-what-you-use from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A tool for use with clang to analyze #includes in C and C++ source files | https://include-what-you-use.org
- apk - include-what-you-use-dbg - 0.26-r0: normalized package name match | Alpine Linux edge package indexes: include-what-you-use-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A tool for use with clang to analyze #includes in C and C++ source files (debug symbols) | https://include-what-you-use.org
- apk - include-what-you-use-doc - 0.26-r0: normalized package name match | Alpine Linux edge package indexes: include-what-you-use-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A tool for use with clang to analyze #includes in C and C++ source files (documentation) | https://include-what-you-use.org
- dnf - iwyu - 0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: iwyu from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C/C++ source files #include analyzer based on clang | https://github.com/include-what-you-use/include-what-you-use
- zypper - include-what-you-use - 0.26-1.4: normalized package name match | openSUSE Tumbleweed package metadata: include-what-you-use from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A tool to analyze #includes in C and C++ source files | https://include-what-you-use.org/
- zypper - include-what-you-use-tools - 0.26-1.4: normalized package name match | openSUSE Tumbleweed package metadata: include-what-you-use-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Additional tools to use include-what-you-use effectively | https://include-what-you-use.org/
- MacPorts - include-what-you-use: normalized package name match | MacPorts ports tree: devel/include-what-you-use/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/include-what-you-use.yml](https://github.com/mxcl/pkgdb/blob/main/combined/include-what-you-use.yml)


## ソース

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