xcodegen
XcodeGen generates your Xcode project. Tuist is build infrastructure that makes that project's builds and tests faster and easier to investigate for developers, CI, and coding agents, without migrating off XcodeGen.
Claude Code
$ npx -y skills add tuist/tuist --agent claude-code
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
Agent definition
xcodegen.mdXcodeGen vs Tuist: keep XcodeGen, add build infrastructure
XcodeGen generates your Xcode project. Tuist is build infrastructure that makes that project's builds and tests faster and easier to investigate for developers, CI, and coding agents, without migrating off XcodeGen.
What is XcodeGen?
[XcodeGen](https://github.com/yonaskolb/XcodeGen) is an open-source, MIT-licensed command-line tool that generates an Xcode project from your folder structure and a project spec. The spec is a YAML or JSON file, `project.yml` by default, that declares targets, configurations, schemes, build settings, and dependencies on other targets, Swift packages, Carthage frameworks, and SDKs. Teams commonly adopt it to stop committing `.xcodeproj` files and the merge conflicts that come with them. Its [project spec](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md) offers `include` for splitting a spec across files, setting groups, and target and scheme templates for reuse.
What is Tuist?
Tuist is build infrastructure for engineering teams and coding agents: a shared environment where developers, CI, and coding agents build and test. It is not a CI provider, a CI runner, or a coding agent. Many Apple developers first met Tuist as a project generator, and generated projects are still one of its capabilities, but most of Tuist works on whatever Xcode project you already have, including one generated by XcodeGen. XcodeGen and Tuist answer different questions: XcodeGen decides how the project is described, and Tuist works on what happens every time that project is built and tested.
Keep XcodeGen, add Tuist
| What you need | Tuist capability | With an XcodeGen project | | --- | --- | --- | | Stop recompiling code another machine already compiled | [Xcode cache](/en/docs-markdown/guides/features/cache/xcode-cache) shares Xcode's compilation outputs across developer machines, CI, and agents | Yes, with Xcode 26 or later | | See where build time goes and when it regressed | [Build insights](/en/docs-markdown/guides/features/build-insights) records every build's duration, steps, and cache results | Yes | | Find slow and flaky tests | [Test insights](/en/docs-markdown/guides/features/test-insights) and [flaky-test detection](/en/docs-markdown/guides/features/test-insights/flaky-tests) keep a shared test history | Yes | | Share builds for review | [Previews](/en/docs-markdown/guides/features/previews) turn an app build into a link teammates can install | Yes | | Give coding agents the same evidence | The [Tuist MCP server](/en/docs-markdown/guides/features/agentic-coding/mcp) exposes build and test records to authorized agents | Yes | | Skip unchanged modules entirely | The [module cache](/en/docs-markdown/guides/features/cache/module-cache) replaces unchanged targets with prebuilt binaries | Requires a Tuist generated project | | Run only the tests a change affects | [Selective testing](/en/docs-markdown/guides/features/selective-testing) skips unchanged test targets | Requires a Tuist generated project |
To connect an XcodeGen project, follow the [existing Xcode project guide](/en/docs-markdown/guides/get-started/existing-xcode-project). Because `xcodegen generate` rewrites the project, put Tuist's configuration in the spec rather than in Xcode: the compilation-cache build settings that `tuist setup cache` prints go in the spec's `settings` or an `.xcconfig` referenced through `configFiles`, and the build-insights script goes in the scheme's `postActions`, with `settingsTarget` set to your app target.
First experiment
Keep XcodeGen as it is. Record a clean build, the same build on a second machine, and a full test run. Connect the [Xcode cache](/en/docs-markdown/guides/features/cache/xcode-cache), [build insights](/en/docs-markdown/guides/features/build-insights), and [test insights](/en/docs-markdown/guides/features/test-insights), then repeat the same runs and compare feedback time, total machine usage, and how quickly someone, or an authorized agent, can explain a slow build or a failing test.
Project generation: YAML spec or Swift manifests
Generation is the one place the tools overlap. Both produce standard Xcode projects and workspaces, both let you remove generated projects from Git, and XcodeGen writes projects with [XcodeProj](https://github.com/tuist/XcodeProj), the same library Tuist uses. The difference is the language. XcodeGen describes projects in a YAML or JSON data file and reuses configuration through includes, setting groups, and templates. Tuist describes them in Swift [manifests](/en/docs-markdown/guides/features/projects/manifests), reuses code through [project description helpers](/en/docs-markdown/guides/features/projects/code-sharing), opens them in Xcode with completion and type checking through `tuist edit`, and keeps an explicit dependency graph it can inspect, for example with `tuist inspect dependencies --only implicit`.
That graph is what the module cache and selective testing use to hash targets. It is the practical reason to move generation to Tuist, more than the choice of language.
When to migrate
Migrate when the module cache or selective testing would remove work your team repeats today, or when you want to describe projects in Swift. Until then, XcodeGen and Tuist work together. The [XcodeGen migration guide](/en/docs-markdown/guides/features/projects/adoption/migrate/xcodegen-project) walks through the mapping:
1. Translate `project.yml` into `Project.swift`, one target at a time. Targets, configurations, schemes, and build settings map to the same Xcode concepts. 2. Replace target and scheme templates with project description helpers. 3. Move Swift package dependencies into `Tuist/Package.swift` and run `tuist install`. 4. Replace `xcodegen generate` with `tuist generate` in scripts and CI, then compare the generated project and a clean build against the XcodeGen output.
Large projects can migrate one project or module group
Read more
XcodeGen vs Tuist: keep XcodeGen, add build infrastructure
XcodeGen generates your Xcode project. Tuist is build infrastructure that makes that project's builds and tests faster and easier to investigate for developers, CI, and coding agents, without migrating off XcodeGen.
What is XcodeGen?
[XcodeGen](https://github.com/yonaskolb/XcodeGen) is an open-source, MIT-licensed command-line tool that generates an Xcode project from your folder structure and a project spec. The spec is a YAML or JSON file, `project.yml` by default, that declares targets, configurations, schemes, build settings, and dependencies on other targets, Swift packages, Carthage frameworks, and SDKs. Teams commonly adopt it to stop committing `.xcodeproj` files and the merge conflicts that come with them. Its [project spec](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md) offers `include` for splitting a spec across files, setting groups, and target and scheme templates for reuse.
What is Tuist?
Tuist is build infrastructure for engineering teams and coding agents: a shared environment where developers, CI, and coding agents build and test. It is not a CI provider, a CI runner, or a coding agent. Many Apple developers first met Tuist as a project generator, and generated projects are still one of its capabilities, but most of Tuist works on whatever Xcode project you already have, including one generated by XcodeGen. XcodeGen and Tuist answer different questions: XcodeGen decides how the project is described, and Tuist works on what happens every time that project is built and tested.
Keep XcodeGen, add Tuist
| What you need | Tuist capability | With an XcodeGen project | | --- | --- | --- | | Stop recompiling code another machine already compiled | [Xcode cache](/en/docs-markdown/guides/features/cache/xcode-cache) shares Xcode's compilation outputs across developer machines, CI, and agents | Yes, with Xcode 26 or later | | See where build time goes and when it regressed | [Build insights](/en/docs-markdown/guides/features/build-insights) records every build's duration, steps, and cache results | Yes | | Find slow and flaky tests | [Test insights](/en/docs-markdown/guides/features/test-insights) and [flaky-test detection](/en/docs-markdown/guides/features/test-insights/flaky-tests) keep a shared test history | Yes | | Share builds for review | [Previews](/en/docs-markdown/guides/features/previews) turn an app build into a link teammates can install | Yes | | Give coding agents the same evidence | The [Tuist MCP server](/en/docs-markdown/guides/features/agentic-coding/mcp) exposes build and test records to authorized agents | Yes | | Skip unchanged modules entirely | The [module cache](/en/docs-markdown/guides/features/cache/module-cache) replaces unchanged targets with prebuilt binaries | Requires a Tuist generated project | | Run only the tests a change affects | [Selective testing](/en/docs-markdown/guides/features/selective-testing) skips unchanged test targets | Requires a Tuist generated project |
To connect an XcodeGen project, follow the [existing Xcode project guide](/en/docs-markdown/guides/get-started/existing-xcode-project). Because `xcodegen generate` rewrites the project, put Tuist's configuration in the spec rather than in Xcode: the compilation-cache build settings that `tuist setup cache` prints go in the spec's `settings` or an `.xcconfig` referenced through `configFiles`, and the build-insights script goes in the scheme's `postActions`, with `settingsTarget` set to your app target.
First experiment
Keep XcodeGen as it is. Record a clean build, the same build on a second machine, and a full test run. Connect the [Xcode cache](/en/docs-markdown/guides/features/cache/xcode-cache), [build insights](/en/docs-markdown/guides/features/build-insights), and [test insights](/en/docs-markdown/guides/features/test-insights), then repeat the same runs and compare feedback time, total machine usage, and how quickly someone, or an authorized agent, can explain a slow build or a failing test.
Project generation: YAML spec or Swift manifests
Generation is the one place the tools overlap. Both produce standard Xcode projects and workspaces, both let you remove generated projects from Git, and XcodeGen writes projects with [XcodeProj](https://github.com/tuist/XcodeProj), the same library Tuist uses. The difference is the language. XcodeGen describes projects in a YAML or JSON data file and reuses configuration through includes, setting groups, and templates. Tuist describes them in Swift [manifests](/en/docs-markdown/guides/features/projects/manifests), reuses code through [project description helpers](/en/docs-markdown/guides/features/projects/code-sharing), opens them in Xcode with completion and type checking through `tuist edit`, and keeps an explicit dependency graph it can inspect, for example with `tuist inspect dependencies --only implicit`.
That graph is what the module cache and selective testing use to hash targets. It is the practical reason to move generation to Tuist, more than the choice of language.
When to migrate
Migrate when the module cache or selective testing would remove work your team repeats today, or when you want to describe projects in Swift. Until then, XcodeGen and Tuist work together. The [XcodeGen migration guide](/en/docs-markdown/guides/features/projects/adoption/migrate/xcodegen-project) walks through the mapping:
1. Translate `project.yml` into `Project.swift`, one target at a time. Targets, configurations, schemes, and build settings map to the same Xcode concepts. 2. Replace target and scheme templates with project description helpers. 3. Move Swift package dependencies into `Tuist/Package.swift` and run `tuist install`. 4. Replace `xcodegen generate` with `tuist generate` in scripts and CI, then compare the generated project and a clean build against the XcodeGen output.
Large projects can migrate one project or module group
Tuist is a build platform for engineering teams and their coding agents. It works with Xcode, Gradle, Bazel, Elixir, and Rust builds. Features vary by toolchain: Rust compilation caching is experimental, and Once support is in canary.
Other agents on tuist.
More agents from other plugins.
cavecrew-builder
AgentSurgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…
Questions about xcodegen.
- Which coding agents can use xcodegen?
- xcodegen installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.

