# 使用 Homebrew, Nix 安装 compiledb

查看 compiledb 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:compiledb
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install compiledb
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#compiledb
```

  证据: nixpkgs package indexes: pkgs/by-name/co/compiledb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:compiledb
- **软件包管理器:** Homebrew
- **版本:** 0.10.7
- **来源摘要:** Generate a Clang compilation database for Make-based build systems
- **主页:** <https://github.com/nickdiego/compiledb>
- **仓库:** <https://github.com/nickdiego/compiledb>
- **最后更新:** 2026-07-13T10:21:17Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- compiledb (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.10.7
## 项目历史与用法

compiledb is a Python CLI for generating Clang JSON compilation databases for GNU Make-based build systems.

### 项目历史

The official README says compiledb was written to index Android Open Source Project modules after the author found existing tools unsatisfactory. It reworked ideas from YCM-Generator and aimed to produce `compile_commands.json` quickly without always requiring a clean build, using Make dry-run and keep-going behavior to extract compile commands.

### 采用历史

PyPI records public compiledb releases starting in 2018. The Homebrew input records both Homebrew and Nix packaging, reflecting its role as a small command-line bridge between traditional Make projects and Clang-aware editor or language-server tooling.

### 使用方式

compiledb can wrap `make`, parse build logs or stdin, and write Clang's `compile_commands.json` in arguments-list or command-string form. Its main audience is non-CMake projects that still want editor indexing, static analysis, or language-server support.

### 为什么软件包爱好者会关心

The package is significant because `compile_commands.json` became a de facto interchange file for C and C++ tooling. compiledb gives Make-based projects a lightweight way to participate in that ecosystem without migrating their build system.

### 时间线

- 2018: PyPI records the first public compiledb release.
- 2025: PyPI and GitHub releases record 0.10.x releases.

### Related projects

- compiledb is related to Clang's JSON Compilation Database format, Bear, YCM-Generator, cquery, ccls, and editor tooling such as YouCompleteMe.

### 来源

- <https://github.com/nickdiego/compiledb>
- <https://raw.githubusercontent.com/nickdiego/compiledb/master/README.md>
- <https://pypi.org/pypi/compiledb/json>
- <https://clang.llvm.org/docs/JSONCompilationDatabase.html>


## 安全说明

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal

## 其他软件包管理器记录

- Nix - compiledb: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/compiledb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/compiledb.yml](https://github.com/mxcl/pkgdb/blob/main/combined/compiledb.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
