# Install cfn-format with Homebrew

Command-line tool for formatting AWS CloudFormation templates. Version 1.24.4 via Homebrew; verified 2026-04-23.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cfn-format
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:cfn-format
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cfn-format>
- **Version:** 1.24.4
- **Source summary:** Command-line tool for formatting AWS CloudFormation templates
- **Homepage:** <https://github.com/aws-cloudformation/rain>
- **Repository:** <https://github.com/aws-cloudformation/rain>
- **Upstream docs:** <https://aws-cloudformation.github.io/rain/rain_fmt.html>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/aws-cloudformation/rain/archive/refs/tags/v1.24.4.tar.gz>
- **Last updated:** 2026-04-23T17:45:52Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cfn-format (cli)
- cfn-format (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.24.4
- Package-manager updated: 2026-04-23
- Local data: ok
- Upstream repository: https://github.com/aws-cloudformation/rain
- Upstream latest detected: v1.24.4 (current)
## Project history and usage

cfn-format is the Homebrew-packaged command built from the AWS CloudFormation rain repository's `cmd/cfn-format`, focused on checking and formatting AWS CloudFormation templates.

### Project history

The upstream rain repository was created in 2019 and describes rain as a development workflow tool for AWS CloudFormation templates and stacks. Its README lists consistent formatting of CloudFormation templates as a key feature of `rain fmt`, including JSON/YAML conversion and YAML comment preservation.

### Adoption history

Homebrew packages `cfn-format` separately from rain, building the `./cmd/cfn-format` target from the rain source repository. This gives package users a narrower formatter binary without installing the broader rain workflow CLI name.

### How it is used

The Homebrew formula test runs `cfn-format -v test.template` and expects a formatted-ok message. The rain README documents the broader formatter behavior under `rain fmt`.

### Why package nerds care

cfn-format is package-nerd-interesting because it exposes one subcommand-sized slice of a larger CloudFormation workflow tool as its own formula, the kind of tiny binary split that helps scripts depend on exactly the formatter they need.

### Timeline

- 2019: rain GitHub repository metadata records public repository creation.
- 2019: GitHub release metadata records rain v0.1.0.
- 2026: Homebrew formula builds cfn-format from rain v1.24.4.

### Related projects

- rain is the upstream project and broader CloudFormation workflow CLI.
- cfn-flip is the older AWS Labs converter whose CLI usage now points users to `rain fmt`.

### Sources

- <https://api.github.com/repos/aws-cloudformation/rain>
- <https://github.com/aws-cloudformation/rain>
- <https://aws-cloudformation.github.io/rain/rain_fmt.html>
- <https://github.com/aws-cloudformation/rain#readme>
- <https://formulae.brew.sh/api/formula/cfn-format.json>


## Security Notes

infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- infrastructure mutation or orchestration signal

## Source Database Details

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


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [aws-console](https://www.automicvault.com/pkg/brew/aws-console/) - Shares the same upstream source repository.
- [rain](https://www.automicvault.com/pkg/brew/rain/) - Shares the same upstream source repository.
- [cfnctl](https://www.automicvault.com/pkg/brew/cfnctl/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation, infrastructure-as-code.
- [cfv](https://www.automicvault.com/pkg/brew/cfv/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation, infrastructure-as-code.
- [cfn-flip](https://www.automicvault.com/pkg/brew/cfn-flip/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation.
- [cloudformation-cli](https://www.automicvault.com/pkg/brew/cloudformation-cli/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation, infrastructure-as-code.
- [eksctl](https://www.automicvault.com/pkg/brew/eksctl/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation.
- [basti](https://www.automicvault.com/pkg/brew/basti/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure.
- [cf2tf](https://www.automicvault.com/pkg/brew/cf2tf/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure, cloudformation, infrastructure-as-code.
- [e1s](https://www.automicvault.com/pkg/brew/e1s/) - Shares av.db curated category or tags: aws, cli, cloud-infrastructure.

## Combined YAML source

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


## Sources

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