macOS
brew install include-what-you-uselocal Homebrew formula metadata
sudo port install include-what-you-useMacPorts ports tree · devel/include-what-you-use/Portfile · source: api.github.com
brew
Tool to analyze #includes in C and C++ source files. Version 0.26 via Homebrew; verified from local package data.
install
brew install include-what-you-uselocal Homebrew formula metadata
sudo port install include-what-you-useMacPorts ports tree · devel/include-what-you-use/Portfile · source: api.github.com
sudo apk add include-what-you-useAlpine Linux edge package indexes · include-what-you-use · source: dl-cdn.alpinelinux.org
sudo dnf install iwyuFedora Rawhide package metadata · iwyu · source: dl.fedoraproject.org
nix profile install nixpkgs#include-what-you-usenixpkgs package indexes · include-what-you-use · source: raw.githubusercontent.com
sudo zypper install include-what-you-useopenSUSE Tumbleweed package metadata · include-what-you-use · source: download.opensuse.org
overview
Tool to analyze #includes in C and C++ source files
history
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.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
fix_includes.py | cli | global executable | |
include-what-you-use | cli | global executable | |
iwyu_tool.py | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://include-what-you-use.org/
install metadata
| Package key | brew:include-what-you-use |
|---|---|
| Version | 0.26 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/include-what-you-use |
| Homepage | https://include-what-you-use.org/ |
| Repository | https://github.com/include-what-you-use/include-what-you-use |
| Upstream docs | https://github.com/include-what-you-use/include-what-you-use#readme |
| License | NCSA |
| Source archive | https://include-what-you-use.org/downloads/include-what-you-use-0.26.src.tar.gz |
| Dependencies | llvm |
| Build dependencies | cmake |
| Uses from macOS | ncurses |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | include-what-you-use |
| Aliases |
|
| 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 |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
include-what-you-use
nix profile install nixpkgs#include-what-you-useinclude-what-you-use 0.26-r0
A tool for use with clang to analyze #includes in C and C++ source files
https://include-what-you-use.org
sudo apk add include-what-you-useinclude-what-you-use-dbg 0.26-r0
A tool for use with clang to analyze #includes in C and C++ source files (debug symbols)
https://include-what-you-use.org
sudo apk add include-what-you-use-dbginclude-what-you-use-doc 0.26-r0
A tool for use with clang to analyze #includes in C and C++ source files (documentation)
https://include-what-you-use.org
sudo apk add include-what-you-use-dociwyu 0.26-3.fc45
C/C++ source files #include analyzer based on clang
https://github.com/include-what-you-use/include-what-you-use
sudo dnf install iwyuinclude-what-you-use 0.26-1.2
A tool to analyze #includes in C and C++ source files
https://include-what-you-use.org/
sudo zypper install include-what-you-useinclude-what-you-use-tools 0.26-1.2
Additional tools to use include-what-you-use effectively
https://include-what-you-use.org/
sudo zypper install include-what-you-use-toolsinclude-what-you-use
sudo port install include-what-you-usesource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.