# swift-format を Homebrew でインストール

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

## インストール

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

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

### macOS

- Homebrew (100%):

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

  証拠: local Homebrew formula metadata

## パッケージ情報

- **パッケージキー:** brew:swift-format
- **パッケージマネージャ:** Homebrew
- **バージョン:** 603.0.0
- **ソース概要:** Formatting technology for Swift source code
- **ホームページ:** <https://github.com/swiftlang/swift-format>
- **リポジトリ:** <https://github.com/swiftlang/swift-format>
- **最終更新:** 2026-07-01T13:43:35Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- swift-format (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 603.0.0
## プロジェクトの歴史と使われ方

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.

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

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.

### 採用の歴史

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.

### 使われ方

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.

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

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.

### タイムライン

- 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.

### ソース

- <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>


## セキュリティノート

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: .swift-format

## Combined YAML source

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