# 使用 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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/elm-format>
- **版本:** 0.8.8
- **来源摘要:** Elm source code formatter, inspired by gofmt
- **主页:** <https://github.com/avh4/elm-format>
- **仓库:** <https://github.com/avh4/elm-format>
- **上游文档:** <https://github.com/avh4/elm-format#readme>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://github.com/avh4/elm-format.git>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- elm-format (cli)
- elm-format (别名)

## 依赖

- gmp

## 构建依赖

- cabal-install
- ghc
- hpack

## macOS 提供的库

- libffi

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 0.8.8
- 本地数据: OK
- 上游仓库: https://github.com/avh4/elm-format
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** elm-format
- **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


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [cabal-install](https://www.automicvault.com/zh-hans/pkg/brew/cabal-install/) - Build dependency declared by Homebrew.
- [ghc](https://www.automicvault.com/zh-hans/pkg/brew/ghc/) - Build dependency declared by Homebrew.
- [hpack](https://www.automicvault.com/zh-hans/pkg/brew/hpack/) - Build dependency declared by Homebrew.
- [odinfmt](https://www.automicvault.com/zh-hans/pkg/brew/odinfmt/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, formatter.
- [gofumpt](https://www.automicvault.com/zh-hans/pkg/brew/gofumpt/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [goimports](https://www.automicvault.com/zh-hans/pkg/brew/goimports/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [jsonfmt](https://www.automicvault.com/zh-hans/pkg/brew/jsonfmt/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [jsonpp](https://www.automicvault.com/zh-hans/pkg/brew/jsonpp/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [nixfmt](https://www.automicvault.com/zh-hans/pkg/brew/nixfmt/) - Shares av.db curated category or tags: cli, code-formatter, developer-tool, developer-tools, formatter.
- [pgformatter](https://www.automicvault.com/zh-hans/pkg/brew/pgformatter/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [rubyfmt](https://www.automicvault.com/zh-hans/pkg/brew/rubyfmt/) - Shares av.db curated category or tags: cli, developer-tools, formatter.
- [elm-format](https://www.automicvault.com/zh-hans/pkg/npm/elm-format/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, developer, developer-tools, elm, elm-format.
- [hindent](https://www.automicvault.com/zh-hans/pkg/brew/hindent/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, formatter.
- [elm-format](https://www.automicvault.com/zh-hans/pkg/npm/elm-format/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/elm-format.yml](https://github.com/automic-vault/db/blob/main/combined/elm-format.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
