clang-include-graph
« Back to VersTracker
Description:
Simple tool for visualizing and analyzing C/C++ project include graph
Type: Formula  |  Latest Version: 0.2.0@2  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ c visualization clang dependency-analysis build-system
Install: brew install clang-include-graph
About:
clang-include-graph is a command-line utility that generates and analyzes include graphs for C and C++ projects. It leverages the Clang compiler infrastructure to parse source files and extract accurate include dependencies. This tool helps developers visualize complex header relationships and identify circular dependencies or unnecessary includes.
Key Features:
  • Generates Graphviz DOT format output for visualization
  • Supports various output formats including SVG, PNG, and HTML
  • Integrates with Clang's compilation database for accurate parsing
  • Can filter and focus on specific parts of the include graph
  • Provides both visual and textual representations of dependencies
Use Cases:
  • Analyzing and optimizing build times by identifying heavy header files
  • Refactoring legacy C++ codebases by understanding header dependencies
  • Visualizing architecture and module boundaries in large projects
  • Detecting and resolving circular include dependencies
Alternatives:
  • include-what-you-use – Focuses on removing unnecessary includes, while clang-include-graph is better for visualization and overall dependency analysis
  • doxygen – Generates documentation with include graphs as a secondary feature, whereas clang-include-graph is dedicated to include analysis
  • cmake --graphviz – Shows build dependencies at the CMake level, while clang-include-graph works at the source code level for precise header analysis
License: Apache-2.0
Dependencies: boost, llvm
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 12, 2025 8:10pm 1 VERSION_BUMP 70ad3a4a