Hi all,
I’m excited to introduce XcodeGraphGenerator, a Swift-based tool designed to help visualize Xcode project dependencies by generating interactive graphs. This tool parses Xcode projects and packages, then builds a directed acyclic graph (DAG) of the dependencies, which can be viewed via a web interface powered by Cytoscape.js. The entire backend is built using SwiftNIO, making it lightweight and efficient for serving the generated project graph.
Check out the live demo here.
Why This Could Fit into TuistCLI
I believe XcodeGraphGenerator could be a valuable addition to TuistCLI, providing visual insights into the structure of Xcode projects. This feature could complement Tuist’s goal of simplifying project management by giving developers a visual representation of target, package, and framework dependencies.
I decided it should Tuist-agnostic—similar to the XcodeGraph package it depends on—so that it can be useful to any Swift/Xcode project, not just those using Tuist.
That said, I’m more than happy to discuss how this could be adapted or integrated into the Tuist ecosystem if there is interest from the team.
Key Features:
- Parses Xcode projects and packages with XcodeGraph to build a comprehensive graph.
- Generates a directed acyclic graph (DAG) representing project dependencies.
- Serves the graph over HTTP using SwiftNIO and visualizes it through Cytoscape.js.
- Fully cross-platform (macOS, Linux, and Windows support).
- Can be extended to support advanced project structures and dependencies.
Integration with TuistCLI
I can see potential for this tool to integrate with TuistCLI, allowing users to generate dependency graphs from the command line. Although it’s currently Tuist-agnostic, the core functionality could certainly complement Tuist’s feature set, the graph
command could easily have a -i
flag and use the XcodeGraph
alreadyh available there.
Possible Enhancements
- Watch the manifest somehow and hot reload
- Change manifest through web interface (ie static vs dynamic)
How to Get Started:
- Clone the repository: XcodeGraphGenerator GitHub
- Build and run the tool using Swift Package Manager.
- Visualize your project’s dependencies via a local web server at
http://localhost:8081
.
Open to Collaboration and Feedback
I would love to collaborate with the community and the Tuist team to see how this tool can be improved or adapted to fit within TuistCLI. Please feel free to explore the project, provide feedback, or contribute. If Tuist is interested in taking over this project or integrating it officially, I’m happy to support that process.
Thanks, and I look forward to hearing your thoughts!