bear
« Back to VersTracker
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
Version History
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