When you’re working in a large, multi-module Swift codebase, the project-file
overhead becomes its own engineering problem. Adding a new module shouldn’t
require editing .pbxproj files. Adding a SwiftPM dependency shouldn’t
trigger a five-minute version resolution dance every time you open the
project. Adding an image to an asset catalog shouldn’t mean typing the literal
string "my_image_name" into Swift code with no compile-time safety.
Velocity is a CLI that handles all of that. It sits on top of XcodeGen and SwiftPM and automates the parts of multi-module project setup that I kept doing by hand.
The big pieces:
pull-dependencies reads a dependencies.yml, fetches the SwiftPM
packages it lists, and stores them locally so Xcode treats them as
path-based dependencies. This skips remote resolution entirely on every
subsequent build.imports.yml, project-modules.yml, and
project-dependencies.yml — the YAML that XcodeGen consumes to build the
actual .xcodeproj. Adding a new module is just creating a folder.generate-resources emits typed Swift extensions on UIImage and
UIColor for every entry in your .xcassets — type-safe resource access
without writing it by hand.sanitize-xcodegen-project quietly cleans up build artifacts and
project timestamps when nothing’s actually changed, to avoid spurious
rebuilds.It’s pretty opinionated, but the opinions are the ones I wanted enforced across a large codebase. The cost of adding a new module dropped from “edit six files” to “create a folder and run the generator.”