# 使用 Homebrew 安装 cfr-decompiler

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

## 安装

```sh
sudo av install brew:cfr-decompiler
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cfr-decompiler
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:cfr-decompiler
- **软件包管理器:** Homebrew
- **版本:** 0.152
- **来源摘要:** Yet Another Java Decompiler
- **主页:** <https://www.benf.org/other/cfr/>
- **仓库:** <https://github.com/leibnitz27/cfr>
- **最后更新:** 2026-06-22T14:03:00-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cfr-decompiler (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

CFR is a Java bytecode decompiler distributed as the `cfr-decompiler` Homebrew formula. Its official site describes it as another Java decompiler that can handle modern Java features while being written in Java 6 for broad runtime compatibility.

### 项目历史

The official GitHub repository was created in May 2014 and points users to benf.org as the main CFR site. The README says CFR can decompile modern Java features, including Java 9, 12, and 14 features, and can make a reasonable attempt at JVM languages such as Kotlin, Scala, and Groovy.

The benf.org project page records a long release history, including 0.146 in July 2019, 0.147 in October 2019, 0.150 in May 2020, 0.151 in February 2021, and 0.152 in December 2021. The README notes that since 0.145, binaries have also been published on GitHub releases.

### 采用历史

CFR's adoption comes from the Java reverse-engineering and debugging niche: developers use it when they need readable Java-like output from class files or jars, especially for newer language features that older decompilers may not handle cleanly.

Official distribution includes the benf.org jar downloads, GitHub release artifacts, and Maven Central. The Homebrew package wraps that Java tool in a package-manager-friendly executable for macOS users.

### 使用方式

The documented use is to run the versioned jar against class names or class files, or pass an entire jar and an `--outputdir` when emitting files. The README also documents `--help` for arguments.

CFR supports an options file for decompilation tests, but the official user docs do not document a persistent application config path or credential file for normal CLI use, so both locations are null.

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

CFR matters to package people because decompilers are operational tools as much as developer tools: they are installed when source is missing, artifacts are suspicious, or bytecode behavior needs inspection.

It is also a classic example of a small Java jar that package managers wrap into a named executable. The package value is not dependency complexity; it is putting a known decompiler on PATH.

### 时间线

- 2014: The leibnitz27/cfr public repository is created on GitHub.
- 2019: CFR 0.146 and 0.147 add support and fixes for Java and Kotlin bytecode patterns.
- 2021: CFR 0.152 is published on benf.org with support and fixes for newer Java features including sealed classes.
- 2026: The official site notes renewed tinkering and points users to the GitHub repository for a modern version.

### Related projects

- The Java compiler and JVM class-file format are the direct targets CFR decompiles.
- Kotlin, Scala, and Groovy are named in the README as JVM languages whose class files CFR may attempt to turn back into Java.
- Maven Central is an official distribution channel for CFR artifacts.

### 来源

- <https://api.github.com/repos/leibnitz27/cfr>
- <https://github.com/leibnitz27/cfr>
- <https://www.benf.org/other/cfr/>
- <https://github.com/leibnitz27/cfr#readme>
- <https://www.benf.org/other/cfr>
- <https://formulae.brew.sh/api/formula/cfr-decompiler.json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Combined YAML source

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


## 来源

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