# 使用 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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cfr-decompiler>
- **版本:** 0.152
- **来源摘要:** Yet Another Java Decompiler
- **主页:** <https://www.benf.org/other/cfr/>
- **仓库:** <https://github.com/leibnitz27/cfr>
- **上游文档:** <https://www.benf.org/other/cfr/>
- **许可证:** MIT
- **源码归档:** <https://github.com/leibnitz27/cfr.git>
- **最后更新:** 2026-06-22T14:03:00-07:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cfr-decompiler (cli)
- cfr-decompiler (别名)

## 依赖

- openjdk@21

## 构建依赖

- maven

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.152
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://github.com/leibnitz27/cfr
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cfr-decompiler
- **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:** head, stable


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [openjdk@21](https://pkg.so/zh-hans/brew/openjdk-21/) - Runtime dependency declared by Homebrew.
- [maven](https://pkg.so/zh-hans/brew/maven/) - Build dependency declared by Homebrew.
- [fernflower](https://pkg.so/zh-hans/brew/fernflower/) - Shares pkgdb curated category or tags: bytecode, cli, decompiler, developer-tools, java.
- [procyon-decompiler](https://pkg.so/zh-hans/brew/procyon-decompiler/) - Shares pkgdb curated category or tags: bytecode, cli, decompiler, developer-tools, java.
- [dex2jar](https://pkg.so/zh-hans/brew/dex2jar/) - Shares pkgdb curated category or tags: bytecode, cli, developer-tools, java, reverse-engineering.
- [vineflower](https://pkg.so/zh-hans/brew/vineflower/) - Shares pkgdb curated category or tags: cli, decompiler, developer-tools, java.
- [proguard](https://pkg.so/zh-hans/brew/proguard/) - Shares pkgdb curated category or tags: bytecode, cli, developer-tools, java.
- [byteman](https://pkg.so/zh-hans/brew/byteman/) - Shares pkgdb curated category or tags: bytecode, cli, developer-tools, java.
- [tiny-remapper](https://pkg.so/zh-hans/brew/tiny-remapper/) - Shares pkgdb curated category or tags: bytecode, cli, developer-tools, java.
- [jasmin](https://pkg.so/zh-hans/brew/jasmin/) - Shares pkgdb curated category or tags: bytecode, cli, developer-tools, java.

## 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
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
