🍺 BREW Explorer

← all formulae

swiftformat

brew install swiftformat v0.61.1 MIT

Swift code formatter that automatically reformats Swift source files with customizable rules.

Why you might care

SwiftFormat enforces consistent code style across Swift projects and teams, reducing formatting debates in code review. It integrates into build pipelines, Xcode, and editors (VSCode, Sublime), and supports extensive customization via configuration files to match your team's style guide.

Categories

Alternatives

swiftlint
4.6k
30-day installs · #634
20.5k
90-day · #510
97.4k
365-day · #430
8.8k
★ GitHub stars · updated 2d ago

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "swiftlint"
  ],
  "build_dependencies": [],
  "categories": [
    "formatter"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Formatting tool for reformatting Swift code",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:41:00+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "swiftformat",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-06-18T23:49:38Z",
  "github_readme_excerpt": "![](EditorExtension/Application/Assets.xcassets/AppIcon.appiconset/icon_256x256.png)\n\n[![PayPal](https://img.shields.io/badge/paypal-donate-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=9ZGWNK5FEZFF6\u0026source=url)\n[![Build](https://github.com/nicklockwood/SwiftFormat/actions/workflows/build.yml/badge.svg)](https://github.com/nicklockwood/SwiftFormat/actions/workflows/build.yml)\n[![Codecov](https://codecov.io/gh/nicklockwood/SwiftFormat/graphs/badge.svg)](https://codecov.io/gh/nicklockwood/SwiftFormat)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fnicklockwood%2FSwiftFormat%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/nicklockwood/swiftformat)\n[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://opensource.org/licenses/MIT)\n[![Mastodon](https://img.shields.io/badge/mastodon-@nicklockwood@mastodon.social-636dff.svg)](https://mastodon.social/@nicklockwood)\n\nTable of Contents\n-----------------\n\n- [What?](#what-is-this)\n- [Why?](#why-would-i-want-to-do-that)\n- [How?](#how-do-i-install-it)\n    - [Command-line tool](#command-line-tool)\n    - [Xcode source editor extension](#xcode-source-editor-extension)\n    - [Xcode build phase](#xcode-build-phase)\n    - [Swift Package Manager plugin](#swift-package-manager-plugin)\n    - [Via Applescript](#via-applescript)\n    - [VSCode plugin](#vscode-plugin)\n    - [Sublime Text plugin](#sublime-text-plugin)\n    - [Nova plugin](nova-plugin)\n    - [Git pre-commit hook](#git-pre-commit-hook)\n    - [GitHub Actions](#github-actions)\n    - [On CI using Danger](#on-ci-using-danger)\n    - [Bazel build](#bazel-build)\n    - [Docker](#docker)\n    - [Prerelease Builds](#prerelease-builds)\n- [Configuration](#configuration)\n    - [Options](#options)\n    - [Rules](#rules)\n    - [Swift version](#swift-version)\n    - [Config file](#config-file)\n    - [Globs](#globs)\n    - [Linting](#linting)\n    - [Error codes](#error-codes)\n    -",
  "github_repo": "nicklockwood/SwiftFormat",
  "github_stars": 8834,
  "github_topics": [],
  "homepage": "https://github.com/nicklockwood/SwiftFormat",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 4638,
  "installs_365d": 97385,
  "installs_90d": 20485,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": "2026-06-20T23:46:03+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "swiftformat",
  "oldnames": [],
  "one_liner": "Swift code formatter that automatically reformats Swift source files with customizable rules.",
  "optional_dependencies": [],
  "rank_30d": 634,
  "rank_365d": 430,
  "rank_90d": 510,
  "raw_hash": "5d055d585c01f0a6",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/s/swiftformat.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [
    {
      "swift": "build"
    }
  ],
  "version_head": "HEAD",
  "version_stable": "0.61.1",
  "versioned_formulae": [],
  "why_use_this": "SwiftFormat enforces consistent code style across Swift projects and teams, reducing formatting debates in code review. It integrates into build pipelines, Xcode, and editors (VSCode, Sublime), and supports extensive customization via configuration files to match your team\u0027s style guide."
}