# 使用 Homebrew 安装 elm-format

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

## 安装

```sh
sudo av install brew:elm-format
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install elm-format
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:elm-format
- **软件包管理器:** Homebrew
- **版本:** 0.8.8
- **来源摘要:** Elm source code formatter, inspired by gofmt
- **主页:** <https://github.com/avh4/elm-format>
- **仓库:** <https://github.com/avh4/elm-format>
- **最后更新:** 2026-07-30T13:51:20-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- elm-format (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

elm-format is the standard formatter used by many Elm projects to normalize source layout in the style of gofmt. Its official README presents it as a formatter for Elm code based on the Elm style guide, with the practical goal of removing formatting debates from code review.

### 项目历史

The project grew around Elm's transition from an experimental FRP language into a more conventional frontend language with project files and a stable command-line toolchain. Its releases track Elm syntax and project-file eras: the README still documents both Elm 0.18's elm-package.json and Elm 0.19's elm.json, and the release history includes Elm 0.19 alpha and 0.8.x releases.

### 采用历史

Adoption was driven less by a standalone ecosystem and more by editor and workflow integration. The README documents format-on-save support across Atom, Vim, Emacs, Visual Studio Code, Sublime Text, JetBrains IDEs, and other tooling, showing that elm-format became part of the everyday editor setup for Elm programmers.

### 使用方式

The typical usage is direct and project-local: run elm-format on a file or directory, optionally with --yes to overwrite, from a directory containing elm.json or elm-package.json. The tool is also commonly invoked by editor plugins on save and by formatter integrations such as Prettier plugins.

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

For package maintainers, elm-format matters because it makes source diffs more mechanical and keeps package examples, source files, and contributions visually consistent across the Elm ecosystem. It is a small CLI whose importance comes from convention: once a formatter is expected, packages that use it are easier to review and compare.

### 时间线

- 2017: 0.7.0-exp release appears in the GitHub release history.
- 2018: 0.8.0 release aligns the formatter with the Elm 0.19 transition.
- 2023: 0.8.7 release continues maintenance for the Elm 0.19-era formatter.
- 2025: 0.8.8 release is published.

### Related projects

- elm-format follows the same convention-over-style-debate niche as gofmt, but for Elm source files. It is also related to Elm editor plugins and Prettier's Elm integration, which use it as part of save-time or pipeline formatting.

### 来源

- <https://github.com/avh4/elm-format#readme>
- <https://github.com/avh4/elm-format/releases>


## 安全说明

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: elm.json, elm-package.json

## Combined YAML source

View the package source record on GitHub. [combined/elm-format.yml](https://github.com/mxcl/pkgdb/blob/main/combined/elm-format.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
