# Install swift-format with Homebrew

Formatting technology for Swift source code. Version 603.0.0 via Homebrew; verified 2026-07-01.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install swift-format
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:swift-format
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/swift-format>
- **Version:** 603.0.0
- **Source summary:** Formatting technology for Swift source code
- **Homepage:** <https://github.com/swiftlang/swift-format>
- **Repository:** <https://github.com/swiftlang/swift-format>
- **Upstream docs:** <https://github.com/swiftlang/swift-format#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/swiftlang/swift-format.git>
- **Last updated:** 2026-07-01T13:43:35Z
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- swift-format (cli)
- swift-format (alias)

## 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: 603.0.0
- Package-manager updated: 2026-07-01
- Local data: ok
- Upstream repository: https://github.com/swiftlang/swift-format
- info: No cached GitHub release or tag data was available.
## Project history and usage

swift-format is the Swift project's formatter and linting technology for Swift source code. It is distributed as a command-line tool and as a Swift Package Manager dependency, making it part of both day-to-day CLI workflows and editor/build-tool integrations.

### Project history

In February 2019, a Swift Forums pitch proposed that the Swift project adopt an official style guide and provide a formatting tool. The proposal described work on a swift-format tool and framed formatting as a way to reduce project-by-project style churn in the Swift ecosystem.

### Adoption history

The official repository now describes swift-format as providing formatting technology for SourceKit-LSP and building blocks for code-formatting transformations. It also notes that the package can be used either as a command-line tool or linked into other applications through Swift Package Manager.

### How it is used

CLI users run swift-format to check, lint, or rewrite Swift files, with project settings stored in a .swift-format file. Version matching matters: the README documents how Swift 5.8 and later changed swift-format's dependency relationship with SwiftSyntax after the parser was rewritten in Swift.

### Why package nerds care

swift-format matters to package nerds because it sits at the intersection of language tooling, source formatting policy, and compiler-parser versioning. Packaging it is not just about shipping an executable; maintainers also need to track SwiftSyntax and Swift toolchain compatibility so formatter behavior matches the language users are writing.

### Timeline

- 2019: Swift Forums pitch proposes an official Swift style guide and formatter.
- 2019: Swift Evolution discussion of SE-0250 documents .swift-format configuration lookup behavior.
- Swift 5.8 era: README documents the SwiftSyntax parser rewrite and new version-numbering alignment.
- Current: Repository describes swift-format as used by SourceKit-LSP and usable as both CLI and package dependency.

### Related projects

- SwiftSyntax provides syntax-tree infrastructure used by swift-format.
- SourceKit-LSP uses swift-format formatting technology.
- Swift Package Manager is a distribution and embedding route for the formatter.

### Sources

- <https://forums.swift.org/t/pitch-an-official-style-guide-and-formatter-for-swift/21025>
- <https://forums.swift.org/t/se-0250-swift-code-style-guidelines-and-formatter/21795>
- <https://github.com/swiftlang/swift-format>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- 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: .swift-format
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** swift-format
- **Version Scheme:** 1
- **Revision:** 0
- **Head Version:** HEAD
- **Requirements:** xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [findent](https://www.automicvault.com/pkg/brew/findent/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, source-code.
- [hindent](https://www.automicvault.com/pkg/brew/hindent/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, source-code.
- [scalariform](https://www.automicvault.com/pkg/brew/scalariform/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, source-code.
- [swiftformat](https://www.automicvault.com/pkg/brew/swiftformat/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, swift.
- [air](https://www.automicvault.com/pkg/brew/air/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [alejandra](https://www.automicvault.com/pkg/brew/alejandra/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [astyle](https://www.automicvault.com/pkg/brew/astyle/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [black](https://www.automicvault.com/pkg/brew/black/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.

## Combined YAML source

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


## Sources

- 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
