Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects.
It's open source and written in Swift.
With Tuist, projects are defined in a Project.swift
, also known as manifest. The manifest format abstracts you from the implementation details of Xcode projects. In your manifest you can define which targets your project has, which sources and resources belong to them, as well as the dependencies with targets in the same and other projects. The advantages of defining the projects in a manifest are:
- It can catch misconfigurations and fail early. For example, if a target has an invalid dependency, itโll let you know before you start compiling the app.
- Since the manifest doesnโt include Xcode implementation details, the likelihood of having git conflicts is significantly lower.
- It makes the configuration easier. The decision on how the project looks is on you. Tuist processes it and manages the complexity for you. One example of that complexity is setting up dependencies between targets.
The example below shows how projects are defined with Tuist:
import ProjectDescription
let project = Project(name: "App",
targets: [
Target(name: "App",
platform: .iOS,
product: .app,
bundleId: "io.tuist.App",
infoPlist: "Info.plist",
sources: ["Sources/**", "OtherSources/**"],
dependencies: [
/* Target dependencies can be defined here */
/* .framework(path: "framework") */
]),
Target(name: "AppTests",
platform: .iOS,
product: .unitTests,
bundleId: "io.tuist.AppTests",
infoPlist: "Tests.plist",
sources: "Tests/**",
dependencies: [
.target(name: "App")
])
])
Tuist leverages project generation to provide a simple and convenient set of commands, standard across all the projects. The commands infer most of the necessary information from your projects, requiring you to pass only the arguments that are strictly necessary.
Having a standard command line interface makes it easier to jump between projects since thereโs an interaction language everyone in the team is familiar with.
- ๐ฉโ๐ป Init: Bootstraps a new project. You can specify the platform and the type of project and itโll generate all the necessary artifacts (Info.plist, AppDelegate, Project.swift, Playgroundsโฆ).
- ๐ซ Generate: Generates the Xcode workspace and projects to work on a particular project.
- ๐ฆ Build: (Not available yet) Builds the project in the current directory. It supports all the arguments that xcodebuild supports.
- โ Test: (Not available yet) Test the project in the current directory. It supports all the arguments that xcodebuild supports.
- ๐ฑ Run: (Not available yet) Runs the project. If the project needs a device to run on, itโll prompt you to select one.
- ๐ Release: (Not available yet) Builds and publishes your project on iTunes Connect.
The list of actions will likely grow as we get feedback from you.
bash <(curl -Ls https://install.tuist.io)
tuist init --platform ios
tuist generate # Generates Xcode project & workspace
Check out the project "Getting Started" guide to learn more about Tuist and all its features.
Do you want to know more about what Tuist can offer you? Or perhaps want to contribute to the project and you need a starting point? You can check out the project documentation.
- Git clone:
git clone git@github.com:tuist/tuist.git
- Generate Xcode project with
swift package generate-xcodeproj
. - Open
tuist.xcodeproj
. - Have fun ๐ค
Tuist has a suite of unit tests for its various target that can be run via Swift Packager Manager by invoking:
swift test
Additionally, Tuist has a few high level acceptance tests written in cucumber and ruby which can be run by invoking:
rake features
If your project uses Tuist, you can add the following badge to your project README:
[![Tuist Badge](https://img.shields.io/badge/powered%20by-Tuist-green.svg?longCache=true)](https://github.com/tuist)
Tuist is a proud supporter of the Software Freedom Conservacy