A Swift CLI that parses Xcode's xcactivitylog build and test logs into JSON, HTML, Chrome tracing and issue reports.
yonaskolb/XcodeGen
A Swift command line tool that generates Xcode projects from a YAML or JSON project spec and your folder structure.
- Stars
- 8,930
- Forks
- 918
- Open issues
- 404
- Last commit
- 26 days ago
What is it?
XcodeGen creates an Xcode project from a human-readable spec file that defines targets, configurations, schemes, build settings and dependencies. Source directories are parsed automatically and mirrored as groups in Xcode, so adding or moving files on disk is reflected in the project without manual edits in Xcode.
Because the .xcodeproj file can be regenerated on demand, teams can remove it from git and avoid the merge conflicts that project files commonly cause. The spec can be split across multiple files and shared build setting groups let several targets reuse the same configuration. Generation works from the command line, including on CI.
The tool supports Swift Package Manager packages, Carthage frameworks, system SDKs and multi-platform frameworks as dependencies. It can also dump the resolved spec in several formats and uses a cache option to skip regeneration when nothing has changed.
Key features
- 01Generates Xcode projects from a YAML or JSON spec, keeping groups synced with folder structure.
- 02Removes the .xcodeproj from git to avoid project file merge conflicts.
- 03Shares build settings across targets through build setting groups.
- 04Automatically creates schemes for different environments.
- 05Splits the spec across multiple files for sharing and overriding.
- 06Supports Swift packages, Carthage frameworks and SDK dependencies.
Use cases
- Keeping .xcodeproj files out of version control to avoid merge conflicts in iOS or macOS teams.
- Generating Xcode projects on CI machines from a single spec.
- Maintaining large projects with many targets and shared build settings.
- Creating new projects with consistent setups from a template spec.
Quick start
- 1
Make sure the latest stable version of Xcode is installed
- 2
Install XcodeGen with Homebrew
brew install xcodegen - 3
Generate the Xcode project from your project spec in the current directory
xcodegen generate
Things to know
- Requires Xcode, so it only works for Apple platform development on macOS.
In collections
Topics
FAQ
- What is XcodeGen?
- A Swift command line tool that generates Xcode projects from a YAML or JSON project spec and your folder structure. XcodeGen creates an Xcode project from a human-readable spec file that defines targets, configurations, schemes, build settings and dependencies. Source directories are parsed automatically and mirrored as groups in Xcode, so adding or moving files on disk is reflected in the project without manual edits in Xcode.
- Is XcodeGen free to use? What license does it have?
- XcodeGen is open source under the MIT license. Check the license terms before using it in commercial products.
- Is XcodeGen still maintained?
- Actively maintained. The last commit to XcodeGen was on Oct 13, 2026.
- What can I use XcodeGen for?
- Keeping .xcodeproj files out of version control to avoid merge conflicts in iOS or macOS teams. Generating Xcode projects on CI machines from a single spec. Maintaining large projects with many targets and shared build settings. Creating new projects with consistent setups from a template spec.
- How do I install XcodeGen?
- Make sure the latest stable version of Xcode is installed Install XcodeGen with Homebrew: brew install xcodegen Generate the Xcode project from your project spec in the current directory: xcodegen generate
- Where can I get XcodeGen?
- The source code and installation instructions are on GitHub: https://github.com/yonaskolb/XcodeGen
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A macOS CLI and app that turns off background daemons in iOS, tvOS, watchOS, and visionOS simulators so more of them fit in memory on one Mac.
An MCP server and CLI that gives AI coding agents tools to build, test and run iOS and macOS Xcode projects.
A macOS app that gives a GUI for controlling iOS, tvOS, and watchOS simulators by wrapping Apple's simctl tool.
A command-line tool that generates a Plist and license list of your iOS app's dependencies so they appear in the Settings app.
GitHub Copilot integration for Xcode that adds code completion, chat, agent mode and code review for Swift and Objective-C projects.