swift-mod
A command-line tool that sits between code generation and formatting for Swift, applying rules such as adding access modifiers or memberwise initializers based on the parsed syntax tree.
swift-mod is built on Apple's SwiftSyntax and modifies Swift source in place according to configurable rules, for example inserting an explicit access-control keyword or generating a memberwise initializer for a struct, taking the surrounding code's actual structure into account rather than only its text. Rules and formatting options are set in a YAML configuration file, which the tool can generate for a project and which a developer then edits by hand.
Commands include generating the initial configuration file, listing all available rules with detailed descriptions of each one, and running the modifications against the project; every command supports a help flag.
It is written in Swift and licensed under Apache-2.0.