A tool that generates a JSON compilation database for Clang-based tools by intercepting compiler calls during a build.
Bear is a command-line tool that generates a JSON compilation database for Clang-based tooling. It solves the problem of obtaining a compilation database from build systems that do not natively support exporting one, by intercepting compiler invocations during the build process.
C/C++ developers and teams using Clang-based tools (like clang-tidy, clangd, or ccls) for static analysis, refactoring, or IDE integration, especially those with non-CMake/Meson/Bazel build systems.
Developers choose Bear because it provides a simple, cross-platform way to generate compilation databases without modifying build scripts, enabling advanced Clang tooling support in environments where native database generation is unavailable.
Bear is a tool that generates a compilation database for clang tooling.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works on Linux, macOS, multiple BSD variants, and Windows, as explicitly listed in the README, ensuring broad compatibility.
Just prefix your build command with 'bear --', making it easy to integrate without modifying build scripts, as highlighted in the usage section.
Provides a reliable alternative for build systems lacking native JSON compilation database export, focusing on simplicity as per the philosophy.
Intercepts compiler invocations during builds to generate the database automatically, enabling Clang tooling support for unsupported systems.
Requires extra configuration for macOS System Integrity Protection or sandboxed builds like Nix, as noted in the limitations section of the README.
May miss compiler calls in complex build setups, such as those using wrapper scripts or indirect invocations, leading to incomplete databases.
Build interception adds overhead, making it slower and less efficient compared to native compilation database generation in tools like CMake.