Skip to main content

ProjectAutomation Overview

The ProjectAutomation framework provides a stable, serialized API for automation tooling to interact with Tuist projects.

Overview

ProjectAutomation is a separate framework from ProjectDescription that provides the output schema of generated Xcode projects. While ProjectDescription defines the input manifest DSL used in Project.swift files, ProjectAutomation defines the structure of the generated project graph that automation tools can consume.

Key Concepts

Input vs Output

  • ProjectDescription (Input) - The manifest DSL you write in Project.swift
  • ProjectAutomation (Output) - The serialized graph representing the generated Xcode project

Use Cases

ProjectAutomation is designed for:
  • Build automation scripts
  • Custom CI/CD tooling
  • Project analysis tools
  • Testing infrastructure
  • Code generation based on project structure

Loading the Project Graph

The main entry point is the Tuist.graph() method:

Core Types

The ProjectAutomation framework provides these main types:

Graph

The root object representing the entire project graph.

Project

Represents a single Xcode project in the graph.

Target

Represents a build target within a project.

Example: Build Automation

Here’s an example of using ProjectAutomation to build specific targets:

Example: Test Discovery

Automate test target discovery and execution:

Example: Dependency Analysis

Analyze project dependencies:

Automation Tasks

ProjectAutomation also provides a Task type for defining automation tasks:

API Reference