XcodeGen
$ xcodegen Community Low RiskXcodeGen (xcodegen) deterministically generates .xcodeproj bundles from declarative project.yml specifications, eliminating .pbxproj git merge conflicts. It runs non-interactively with --quiet, --use-cache, and --spec, though it emits plain text without JSON or dry-run.
brew install xcodegen xcodegen reads local project.yml and filesystem sources to emit .xcodeproj bundles on macOS; MCP is not applicable.
Agent-Readiness Checklist
Local Probe EvidenceCaptured --help excerpt
Usage: xcodegen [options]
Generate an Xcode project from a spec
Options:
--cache-path <value> Where the cache file will be loaded from and save to. Defaults to ~/.xcodegen/cache/{SPEC_PATH_HASH}
-h, --help Show help information
-n, --no-env Disable environment variable expansions
--only-plists Generate only plist files
-p, --project <value> The path to the directory where the project should be generated. Defaults to the directory the spec is in. The filename is defined in the project spec
-r, --project-root <value> The path to the project root directory. Defaults to the directory containing the project spec.
-q, --quiet Suppress all informational and success output
-s, --spec <value> The path to the project spec file. Defaults to project.yml. (It is also possible to link to multiple spec files by comma separating them. Note that all other flags will be the same.)
-c, --use-cache Use a cache for the xcodegen spec. This will prevent unnecessarily generating the project if nothing has changed FCRS-1.0 6-Dimension Breakdown
Fast, deterministic, non-interactive CLI with --quiet, --spec, --use-cache, and --no-env, though lacks --json and --dry-run.
- Supports
--quiet,--use-cache, and explicit--spec <path>flags - Zero interactive prompts during generation
Deterministic local .xcodeproj generation from declarative YAML; --use-cache skips redundant rewrites.
- Writes only target
.xcodeprojand optional~/.xcodegen/cache/
Compiled Swift binary installable via brew install xcodegen, strictly targeting macOS Apple ecosystems.
- macOS-only binary distributed via Homebrew and GitHub releases
Eliminates brittle .pbxproj edits for agents—modifying project.yml and running xcodegen is vastly safer than patching UUID-heavy Xcode XML.
- Replaces error-prone
.pbxprojediting with declarative YAML
Community project (yonaskolb/XcodeGen) under MIT license, widely used across iOS teams.
- Maintained at
yonaskolb/XcodeGen(MIT)
Clear ProjectSpec.md and Usage.md documentation in the repository alongside concise --help.
- Structured YAML schema docs in
yonaskolb/XcodeGen
Security, Auth & Guardrails
No authentication required; optional spec caches live under ~/.xcodegen/cache/.
MIT open-source CLI; free to use.
# XcodeGen (xcodegen) Agent Rules - Edit `project.yml` instead of hand-editing `.pbxproj` files, then run `xcodegen generate --use-cache --quiet`. - Confirm `.xcodeproj` is gitignored or cleanly diffed after regeneration.
Agent-Ready Command Recipes
Safe Read-Only Queries
xcodegen --help
Prints supported xcodegen flags (--spec, --project, --use-cache, --quiet).
Controlled Writes & Previews
xcodegen generate --spec project.yml --use-cache --quiet
Regenerates .xcodeproj only if project.yml or source tree changed, suppressing success chatter.
Strengths for Agents
- + Lets agents manage Xcode targets, schemes, and files via clean
project.ymlinstead of.pbxprojUUIDs. - +
--use-cacheand--quietmake repeated post-edit regeneration fast and silent. - + Zero interactive prompts or daemon state.
Caveats & Pitfalls
- ! macOS-only and lacks
--dry-runor--jsonoutput. - ! Regenerating overwrites manual changes made directly inside
.xcodeprojvia Xcode UI.