A tool for analyzing C/C++ codebase header dependencies. Header Hero recursively scans source code directories and maps out
#include relationships. It can point out the "worst" headers in terms of total aggregate line count, or "most included" headers
where changing them would cause the most recompiles. Hopefully it can help you reduce the header inclusion issues.
This is a fork/rewrite of an old tool made by (now defunct) BitSquid game engine back in 2011, see Caring by Sharing: Header Hero blog post (webarchive link). The original Bitbucket repository of that tool is long gone by now.
Back in 2018 I made some functionality and UX improvements to it, see Header Hero Improvements blog post.
In 2025 I rewrote the tool from C# WinForms to Avalonia UI framework, using a more modern C#/.NET version as well. So this now works on Windows, Mac and Linux. I did some more UI improvements and performance optimizations too; header scanning on a large codebase is several times faster than before now.
Specify where your project is at, as well as where are the source files under (these folders are scanned recursively), and where are the include folders. Each line there can be an absolute path, or a path relative to project root.
You can specify a precompiled header (absolute path), if you use one. The tool tries to detect "system" (compiler / platform SDK) includes automatically and displays them at the bottom.
Press the "Scan" button! This will show up the main report window. See the above mentioned blog post for details on what it contains.
| Main | Includes | Errors | Missing |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
I have used Jetbrains Rider to build the solution under header_hero/header_hero.sln. It is set to use .NET 9, so you might need to install that. Otherwise just build and run;
things Should Work, hopefully. A different C# IDE or some sort of command line build might work too, but I did not try that.




