macOS
brew install swiftformatlocal Homebrew formula metadata
sudo port install swiftformatMacPorts ports tree · devel/swiftformat/Portfile · 来源: api.github.com
安装
brew install swiftformatlocal Homebrew formula metadata
sudo port install swiftformatMacPorts ports tree · devel/swiftformat/Portfile · 来源: api.github.com
nix profile install nixpkgs#swiftformatnixpkgs package indexes · pkgs/by-name/sw/swiftformat/package.nix · 来源: api.github.com
概览
Formatting tool for reformatting Swift code
历史
SwiftFormat is a Swift source formatter distributed as a command-line tool, library, Xcode extension, and editor/CI integration point. In package-manager culture it is one of the standard small binaries teams add to keep Swift code style mechanical rather than conversational.
The GitHub repository was created in August 2016 under Nick Lockwood's account. The official README frames the project as a formatter for Swift code across macOS, Linux, and Windows, with behavior that goes beyond whitespace into idiomatic Swift rewrites.
SwiftFormat grew around the practical Swift-team problem of agreeing on style without spending review time on formatting. Its configuration file and Swift-version support made it fit naturally into repositories, pre-commit hooks, build phases, and CI jobs.
The official README documents Homebrew, Mint, Nix, CocoaPods, Swift Package Manager binary artifacts, Xcode, Git hooks, GitHub Actions, Danger, Bazel, Docker, and editor plugins as supported usage paths. That breadth is the package-nerd signal: the tool is meant to live wherever a Swift build or review workflow runs.
The input package facts also list Homebrew, MacPorts, and Nix packages, showing that distribution has moved beyond a single macOS tap into multiple package-manager ecosystems.
Common usage is `swiftformat .` or a configured project invocation. Teams usually check in `.swiftformat` and, where needed, `.swift-version` so formatting behavior follows the repository rather than a developer's local defaults.
Because SwiftFormat rewrites files in place, it is often run before review, in a pre-commit hook, or in CI lint mode so formatting drift is caught early.
SwiftFormat matters to package maintainers because it turns source style into a reproducible tool dependency. It is the kind of package that appears in Brewfiles, dev shells, CI images, and onboarding scripts precisely because every contributor needs the same binary and rules.
Its many installation surfaces also make it a useful test case for Swift CLI packaging: SwiftPM, Homebrew, Mint, Nix, CocoaPods-installed binaries, Bazel, and Docker all have to point to the same practical workflow.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
.swiftformat.swift-version可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
swiftformat | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/nicklockwood/SwiftFormat
安装元数据
| 软件包键 | brew:swiftformat |
|---|---|
| 版本 | 0.62.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/swiftformat |
| 主页 | https://github.com/nicklockwood/SwiftFormat |
| 仓库 | https://github.com/nicklockwood/SwiftFormat |
| 上游文档 | https://github.com/nicklockwood/SwiftFormat#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/nicklockwood/SwiftFormat/archive/refs/tags/0.62.1.tar.gz |
| 最后更新 | 2026-07-07T16:37:39Z |
| Pulse | updated |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | swiftformat |
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
swiftformat
nix profile install nixpkgs#swiftformatswiftformat
sudo port install swiftformat来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.