Description:
Generate compilation database for clang tooling
|
|
Type: Formula
|
Latest Version: 3.1.6@15
|
Tracked Since: Dec 17, 2025
|
|
Links:
Homepage |
formulae.brew.sh
|
|
Category: Developer tools
|
|
Tags:
clang
compilation-database
c++
static-analysis
developer-tools
|
|
Install:
brew install bear
|
About:
Bear is a tool that generates a compilation database in JSON format for clang tooling. It works by intercepting the build process to capture compiler calls and their arguments. This enables static analysis tools, IDEs, and other utilities to understand the project structure accurately.
|
Key Features:
- Intercepts build commands to capture compilation flags
- Generates standard JSON Compilation Database (compile_commands.json)
- Compatible with clang-based tools like clangd, clang-tidy, and clang-query
- Supports various build systems (Make, CMake, Autotools, etc.)
|
Use Cases:
- Enabling code intelligence and auto-completion in editors using clangd
- Running static analysis tools (e.g., clang-tidy) on existing codebases
- Refactoring C/C++ projects with clang-refactor or clang-apply-replacements
|
Alternatives:
-
intercept-build (scan-build)
– Part of the Clang static analyzer; Bear is often more robust for complex build systems.
-
compiledb
– Python-based generator; Bear is generally faster and handles more edge cases.
|
|
License: GPL-3.0-or-later
|
|
Dependencies: abseil, fmt, grpc, nlohmann-json, protobuf, spdlog
|
|
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
|
| Detected |
Version |
Rev |
Change |
Commit |
| Dec 13, 2025 5:36pm |
|
15 |
VERSION_BUMP |
383c85f2 |
| Nov 15, 2025 1:27am |
|
14 |
VERSION_BUMP |
c958dd6a |
| Oct 21, 2025 1:08am |
|
12 |
VERSION_BUMP |
5fa0966f |
| Oct 12, 2025 2:41am |
|
10 |
VERSION_BUMP |
314c7786 |
| Sep 16, 2025 12:17pm |
|
9 |
VERSION_BUMP |
2f7db091 |
| Sep 13, 2025 12:37pm |
|
7 |
VERSION_BUMP |
c64cdd6b |
| Jan 10, 2025 5:04am |
|
10 |
VERSION_BUMP |
96c26144 |
| Nov 18, 2024 3:37pm |
|
5 |
VERSION_BUMP |
cda4f6c5 |
| Sep 29, 2024 8:50am |
|
1 |
VERSION_BUMP |
62960115 |
| Sep 29, 2024 2:43am |
|
1 |
VERSION_BUMP |
e551ab7d |
| Sep 26, 2024 4:30pm |
|
0 |
VERSION_BUMP |
8eb5564a |
| Sep 26, 2024 11:41am |
|
0 |
VERSION_BUMP |
eaa90352 |
| Sep 26, 2024 5:18am |
|
9 |
VERSION_BUMP |
706dd0d2 |
| Sep 14, 2024 7:49am |
|
8 |
VERSION_BUMP |
c6c99dcc |
| Sep 10, 2024 7:27pm |
|
7 |
VERSION_BUMP |
894f2799 |
| Sep 6, 2024 4:01am |
|
7 |
VERSION_BUMP |
73508c7d |
| May 18, 2024 12:02pm |
|
0 |
VERSION_BUMP |
ef33c63f |
| Jan 18, 2024 11:14am |
|
11 |
VERSION_BUMP |
4be1357d |
| Jan 18, 2024 9:04am |
|
11 |
VERSION_BUMP |
daf7faf4 |
| Nov 18, 2023 3:22pm |
|
9 |
VERSION_BUMP |
a8e3e391 |
| Nov 18, 2023 3:13pm |
|
9 |
VERSION_BUMP |
f33b64c5 |
| Oct 8, 2023 10:17am |
|
7 |
VERSION_BUMP |
81454361 |
| Aug 30, 2023 8:55pm |
|
3 |
VERSION_BUMP |
67079015 |
| Aug 28, 2023 11:22pm |
|
1 |
REVISION_ONLY |
3633d59a |
| Aug 28, 2023 1:22pm |
|
0 |
VERSION_BUMP |
9977e0e5 |
| Aug 23, 2023 4:44pm |
|
8 |
VERSION_BUMP |
25bc46c3 |
| Jun 15, 2023 2:22pm |
|
4 |
VERSION_BUMP |
cf434aa2 |
| Jun 15, 2023 9:24am |
|
4 |
VERSION_BUMP |
f42a4028 |
| Jun 6, 2023 10:40pm |
|
3 |
VERSION_BUMP |
05b8d2a3 |
| Jun 6, 2023 4:31pm |
|
3 |
VERSION_BUMP |
d0e4fcaf |
| May 21, 2023 12:52pm |
|
1 |
VERSION_BUMP |
9322da75 |
| May 14, 2023 3:06am |
|
0 |
VERSION_BUMP |
57d776f2 |
| Apr 12, 2023 9:55pm |
|
3 |
VERSION_BUMP |
cb5f1ed3 |
|