Automic VaultAutomic Vault

brew

Install swift-format with Homebrew

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

install

Additional install commands

macOS

Homebrewverified · 100%
brew install swift-format

local Homebrew formula metadata

overview

Package summary

Formatting technology for Swift source code

Commands and aliases

  • swift-format

history

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.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

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

Config paths the tool may read or write during local use.

Unix
.swift-format

executables

Installed executables

CommandKindExposureNote
swift-formatcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version603.0.0
manager updated2026-07-01
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/swiftlang/swift-format

install metadata

Package metadata

Package keybrew:swift-format
Version603.0.0
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/swift-format
Homepagehttps://github.com/swiftlang/swift-format
Repositoryhttps://github.com/swiftlang/swift-format
Upstream docshttps://github.com/swiftlang/swift-format#readme
LicenseApache-2.0
Source archivehttps://github.com/swiftlang/swift-format.git
Last updated2026-07-01T13:43:35Z
Pulseupdated
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameswift-format
Version Scheme1
Revision0
Head VersionHEAD
Requirements
  • xcode
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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