Skip to content
Laszlo Nagy edited this page Mar 31, 2026 · 7 revisions

Bear is a tool that generates a JSON compilation database for Clang tooling.

It captures compiler invocations during the build process and writes compile_commands.json, which describes how each translation unit is compiled. Tools like clangd, clang-tidy, and other Clang-based analysis tools use this file to understand your project's build configuration.

Quick start

bear -- <your-build-command>

User guide

Project

Clone this wiki locally