macOS
brew install bearlocal Homebrew formula metadata
sudo port install BearMacPorts ports tree · devel/Bear/Portfile · source: api.github.com
brew
Generate compilation database for clang tooling. Version 4.1.5 via Homebrew; verified 2026-07-03. Also installable with debian: sudo apt install bear.
install
brew install bearlocal Homebrew formula metadata
sudo port install BearMacPorts ports tree · devel/Bear/Portfile · source: api.github.com
sudo apk add bearAlpine Linux edge package indexes · bear · source: dl-cdn.alpinelinux.org
sudo apt install bearDebian stable package indexes · bear · source: deb.debian.org
sudo dnf install bearFedora Rawhide package metadata · bear · source: dl.fedoraproject.org
nix profile install nixpkgs#bearnixpkgs package indexes · pkgs/by-name/be/bear/package.nix · source: api.github.com
sudo pacman -S bearArch Linux sync databases · bear · source: geo.mirror.pkgbuild.com
sudo zypper install BearopenSUSE Tumbleweed package metadata · Bear · source: download.opensuse.org
winget install --id the-sz.Bear -eWindows Package Manager source index · the-sz.Bear · source: cdn.winget.microsoft.com
overview
Generate compilation database for clang tooling
history
Bear generates compile_commands.json compilation databases for Clang tooling by capturing compiler invocations during a build.
The official repository describes Bear as a tool for producing the JSON compilation database used by Clang-based tools to understand compiler flags, include paths, and other translation-unit settings.
Bear exists for build systems that cannot emit a compilation database directly. Its README now advises users to prefer native compilation-database export from CMake, Meson, or Bazel when available, and to use Bear as the compatibility bridge for other builds.
The install documentation notes that Bear has been around for a while, is packaged by many distributions, and is now implemented in Rust, with a preload library still involved in compiler-call interception.
Bear's adoption followed the spread of clang tooling, clangd, clang-tidy, and editor integrations that expect compile_commands.json. The supplied package metadata shows broad packaging across Homebrew, Debian, Ubuntu, Fedora, Alpine, Arch, MacPorts, Nix, Winget, and openSUSE.
The README warns that some package managers still ship the 2.4.x command-line behavior, which is a useful package-history detail: Bear is widely packaged, but users can encounter different major-version interfaces depending on distribution lag.
Modern Bear usage is `bear -- <build-command>`. It writes compile_commands.json to the current working directory after observing the build.
The README calls out platform-specific limitations around interception, including macOS System Integrity Protection and sandboxed builds such as Nix and Flatpak; users are directed to the wiki for workarounds.
Bear is important because compile_commands.json became the lingua franca for C and C++ tooling. Installing Bear can make old Makefile or custom builds visible to clangd and static-analysis tools without rewriting the build system.
For package nerds it is also a reminder that developer tools can be infrastructure glue: a small CLI whose whole job is to translate messy local build behavior into a stable JSON artifact other tools understand.
security posture
broad file, network, media, or database tool signal.
blue risk · medium confidence · tool
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
bear | cli | global executable | |
bear-driver | cli | global executable | |
bear-wrapper | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/rizsotto/Bear
install metadata
| Package key | brew:bear |
|---|---|
| Version | 4.1.5 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/bear |
| Homepage | https://github.com/rizsotto/Bear |
| Repository | https://github.com/rizsotto/Bear |
| Upstream docs | https://github.com/rizsotto/Bear#readme |
| License | GPL-3.0-or-later |
| Source archive | https://github.com/rizsotto/Bear/archive/refs/tags/4.1.5.tar.gz |
| Last updated | 2026-07-03T17:56:33Z |
| Pulse | updated |
| Build dependencies | pkgconf, rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bear |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
bear 3.1.6-1
generate compilation database for Clang tooling
https://github.com/rizsotto/Bear
sudo apt install bearlibear 3.1.6-1
generate compilation database for Clang tooling (wrapper library)
https://github.com/rizsotto/Bear
sudo apt install libearbear
nix profile install nixpkgs#bearbear 3.1.3-1build4
generate compilation database for Clang tooling
https://github.com/rizsotto/Bear
sudo apt install bearlibear 3.1.3-1build4
generate compilation database for Clang tooling (wrapper library)
https://github.com/rizsotto/Bear
sudo apt install libearbear 4.1.4-r0
Tool that generates a compilation database for clang tooling
https://github.com/rizsotto/Bear
sudo apk add bearbear-doc 4.1.4-r0
Tool that generates a compilation database for clang tooling (documentation)
https://github.com/rizsotto/Bear
sudo apk add bear-docbear 4.1.4-1.fc45
Tool that generates a compilation database for clang tooling
https://github.com/rizsotto/bear
sudo dnf install bearbear 4.1.4-1
A tool to generate compilation database for clang tooling
https://github.com/rizsotto/Bear
sudo pacman -S bearBear 3.1.6-1.20
Tool to generate compilation database for clang tooling
https://github.com/rizsotto/Bear
sudo zypper install BearBear
sudo port install Bearthe-sz.Bear
winget install --id the-sz.Bear -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.