# 使用 Homebrew 安装 erlfmt

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

## 安装

```sh
sudo av install brew:erlfmt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install erlfmt
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:erlfmt
- **软件包管理器:** Homebrew
- **版本:** 1.8.0
- **来源摘要:** Automated code formatter for Erlang
- **主页:** <https://github.com/WhatsApp/erlfmt>
- **仓库:** <https://github.com/WhatsApp/erlfmt>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- erlfmt (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

erlfmt is WhatsApp's opinionated Erlang code formatter, packaged as a CLI and rebar3 workflow for teams that want consistent Erlang formatting.

### 项目历史

The README describes erlfmt as an automated formatter that lets teams focus on code behavior rather than formatting debates. The project reached version 1.0.0 on June 29, 2021 and states that it is feature complete, with only backwards-compatible changes and bug fixes considered without serious review.

### 采用历史

erlfmt's main adoption path is as a rebar3 project plugin, adding a rebar3 fmt task and CI-friendly --check mode. The README also documents standalone escript use and editor integrations.

### 使用方式

Users add erlfmt to project_plugins in rebar.config, run rebar3 fmt to format a project, or run the escript directly against Erlang source globs. Later releases kept pace with OTP language changes, including OTP 27 sigils and triple-quoted strings and OTP 28 comprehension features.

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

For package managers, erlfmt is valuable because it is a deterministic formatter with a deliberate stability promise after 1.0. That makes it suitable for CI checks and repository-wide formatting without a constantly shifting style baseline.

### 时间线

- 2021-06-29: erlfmt 1.0.0 released.
- 2024-09-03: erlfmt 1.5.0 added OTP 27 feature support.
- 2025-06-13: erlfmt 1.7.0 added OTP 28 feature support.
- 2026-02-23: erlfmt 1.8.0 added more formatter enhancements and fixes.

### Related projects

- erlfmt integrates with rebar3 and requires Erlang/OTP.
- The README compares erlfmt with rebar3_format, steamroller, and erl_tidy.

### 来源

- <https://raw.githubusercontent.com/WhatsApp/erlfmt/main/README.md>
- <https://raw.githubusercontent.com/WhatsApp/erlfmt/main/CHANGELOG.md>
- <https://api.github.com/repos/WhatsApp/erlfmt/releases?per_page=10>
- <https://formulae.brew.sh/formula/erlfmt>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: PROJECT_ROOT/rebar.config

## Combined YAML source

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


## 来源

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