# fourmolu を Homebrew, Nix でインストール

fourmolu のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:fourmolu
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install fourmolu
```

  証拠: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#fourmolu
```

  証拠: nixpkgs package indexes: pkgs/by-name/fo/fourmolu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:fourmolu
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/fourmolu>
- **バージョン:** 0.20.0.0
- **ソース概要:** Formatter for Haskell source code
- **ホームページ:** <https://fourmolu.github.io/>
- **リポジトリ:** <https://github.com/fourmolu/fourmolu>
- **上流ドキュメント:** <https://fourmolu.github.io/>
- **ライセンス:** BSD-3-Clause
- **ソースアーカイブ:** <https://hackage.haskell.org/package/fourmolu-0.20.0.0/fourmolu-0.20.0.0.tar.gz>
- **最終更新:** 2026-07-22T05:23:32Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- fourmolu (cli)
- fourmolu (エイリアス)

## 依存関係

- gmp

## ビルド依存関係

- cabal-install
- ghc

## macOS 提供ライブラリ

- libffi

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 0.20.0.0
- マネージャ更新日: 2026-07-22
- ローカルデータ: OK
- 上流リポジトリ: https://fourmolu.github.io/
- 情報: Release/tag comparison is only available for GitHub repositories.
## プロジェクトの歴史と使われ方

Fourmolu is a formatter for Haskell source code. It is an Ormolu fork that keeps Ormolu's parser-driven, idempotent formatting goals while adding configurable style options through CLI flags and `fourmolu.yaml`.

### プロジェクトの歴史

The repository was created in 2020 and describes itself as a fork of Ormolu with upstream improvements continually merged. The official README frames the project around one key departure from Ormolu: replacing the no-configuration style rule with configurable parameters.

The changelog shows a pattern of adding Fourmolu-specific configuration while also importing upstream Ormolu changes, including parser updates, formatting fixes, and support for new GHC language features.

### 採用の歴史

Fourmolu is adopted by Haskell projects that want automatic formatting but need policy knobs that Ormolu intentionally avoids. The README documents installation through GHCup, Cabal, Stack, release notes, editor integration through Haskell Language Server, and CI through the recommended `run-fourmolu` GitHub Action.

### 使われ方

Users run `fourmolu Module.hs` to print formatted output, `fourmolu -i` to rewrite files, or `fourmolu --mode check` in CI. Configuration can be written in `fourmolu.yaml`, discovered from parent directories and the XDG config directory, or passed as command-line options.

### パッケージ好きにとっての重要性

Fourmolu is a package-nerd case study in formatter governance. It forked an intentionally opinionated tool not to change the parser architecture, but to change the social contract around style configuration, while still tracking upstream Ormolu.

### タイムライン

- 2020: The public `fourmolu/fourmolu` repository was created.
- 2023: v0.13.x and v0.14.x releases continued the configurable formatter line.
- 2024: v0.16.x added explicit configuration-file selection and upstream parser updates.
- 2025: v0.19.0.0 added options such as `haddock-location-signature` and `if-style`.
- 2026: v0.20.0.0 made Fourmolu installable with GHCup and added more import-grouping and record-style configuration.

### Related projects

- Fourmolu is directly related to Ormolu, GHC, ghc-lib-parser, Cabal, Stack, GHCup, Haskell Language Server, Hackage, and the `run-fourmolu` GitHub Action.

### ソース

- <https://api.github.com/repos/fourmolu/fourmolu>
- <https://api.github.com/repos/fourmolu/fourmolu/releases>
- <https://fourmolu.github.io/>
- <https://fourmolu.github.io/changelog/>
- <https://fourmolu.github.io/config/>
- <https://github.com/fourmolu/fourmolu>
- <https://raw.githubusercontent.com/fourmolu/fourmolu/main/README.md>


## セキュリティノート

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: fourmolu.yaml
## ソースデータベース詳細

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

## 他のパッケージマネージャ記録

- Nix - fourmolu: normalized package name match | nixpkgs package indexes: pkgs/by-name/fo/fourmolu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [cabal-install](https://pkg.so/ja/brew/cabal-install/) - Build dependency declared by Homebrew.
- [ghc](https://pkg.so/ja/brew/ghc/) - Build dependency declared by Homebrew.
- [scalariform](https://pkg.so/ja/brew/scalariform/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, source-code.
- [hindent](https://pkg.so/ja/brew/hindent/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, haskell, source-code.
- [swift-format](https://pkg.so/ja/brew/swift-format/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, source-code.
- [goimports](https://pkg.so/ja/brew/goimports/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [ktfmt](https://pkg.so/ja/brew/ktfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [ormolu](https://pkg.so/ja/brew/ormolu/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, haskell.
- [haskell-language-server](https://pkg.so/ja/brew/haskell-language-server/) - Shares pkgdb curated category or tags: cli, developer-tools, haskell.
- [dfmt](https://pkg.so/ja/brew/dfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, source-code.
- [cgrep](https://pkg.so/ja/brew/cgrep/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, developer, developer-tools, gmp.

## Combined YAML source

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


## ソース

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
