XcodeGen CLI
XcodeGen is an Xcode project generator that shares settings across targets, keeping configuration in a text specification.
- 8,930 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The CLI reads source directories and writes Xcode project files and generation cache.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/xcodegenDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The CLI reads source directories and writes Xcode project files and generation cache.
This is third-party code. Review the repository files before installing.
What it does
XcodeGen is a CLI that generates Xcode targets, schemes and settings from a YAML or JSON specification and source folders. Teams can recreate projects locally or in CI from the same rules. Shared settings and included specification files reduce repetition. Generated projects follow disk structure. Agents edit a text specification, then users inspect targets and verify the build.
Who it is for. iOS project teams coordinating Xcode configuration while reducing manual project-file edits.
Good fit when
- Xcode project conflicts impede parallel source work.
- Multiple targets share build settings.
- CI needs reproducible project generation before checks.
- A complex project needs smaller reusable specifications.
Not a fit when
- Manual xcodeproj changes have not been captured in the specification.
- The host lacks a supported Xcode build environment.
- You expect project generation to repair compilation errors automatically.
Example request
Prepare a two-target XcodeGen specification with shared settings. Generate separately and show the differences.Limitations
A current stable Xcode installation is required, and the first README method also uses Mint. The specification becomes the settings source, so migrate manual generated-project edits before regenerating. Caching skips generation only when the specification and included files are unchanged; account for the selected cache path during diagnosis. Dependency availability and successful compilation still require separate verification.
How to disable. Remove generation from CI and retain a verified project if switching to manual maintenance, then uninstall XcodeGen.
FAQ
What is the default specification?
The default is `project.yml` in the current directory. `xcodegen generate` reads it and creates the project from that specification.
Can I use JSON?
Yes. Pass it with `--spec`; JSON specifications are supported.
Where is output written?
Beside the specification by default, or to the directory selected by `--project`.
How do I avoid unnecessary generation?
Use `--use-cache`. Generation is skipped when the specification and included files have not changed; account for the selected cache path during diagnosis.
Can I inspect the resolved specification?
Yes. `xcodegen dump` outputs the resolved specification, including imported files. It shows which settings the generated project will receive.
Discussion
No questions or reviews yet.
Related
CLI toolsAn MCP server for Xcode on macOS: the agent creates projects, builds and tests apps, installs dependencies and drives the iOS simulator
XcodeBuildMCP (now MobileBuildMCP)
XcodeBuildMCP
An MCP server and CLI from Sentry for building, running and testing Xcode iOS and macOS projects from an AI agent
Evan Bacon's skill teaches an agent to add widgets, App Clips, Safari extensions and other native Apple targets to an Expo app
A terminal agent for phones: state a goal in plain words and it reads the screen, then decides where to tap and what to type
A skill with scripts for building iOS apps and driving the simulator through the accessibility tree, with compact output for agents
A plugin with 164 skills for iOS, macOS, watchOS and visionOS development: code generators, idea-to-App-Store workflow, ASO, testing and design
README in short
The specification describes Swift packages, frameworks and dependencies between targets. The generator transfers those relationships into the project with build settings.