Swiftpack.co - Package - tuist/tuist



code style: prettier CircleCI codecov

What's Tuist

Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects.

It's open source and written in Swift.

Defining your projects

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/**",
                               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")
                               ])
                      ])

Although we encourage defining the manifests in Swift, Tuist also supports JSON and Yaml formats.

Interacting with your projects

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.

Install

Running script:

eval "$(curl -sL https://raw.githubusercontent.com/tuist/tuist/master/script/install)"

Bootstrap your first project

tuist init --platform ios --product application
tuist generate # Generates Xcode project

Check out the project "Getting Started" guide to learn more about Tuist and all its features.

Setup for development

  1. Git clone: git@github.com:tuist/tuist.git
  2. Generate Xcode project with swift package generate-xcodeproj.
  3. Open tuist.xcodeproj.
  4. Have fun 🤖

Roadmap 📚

The roadmap of Tuist is as open as the source code. Check out our public Trello board to know more about what's coming.

Shield

If your project uses Tuist, you can add the following badge to your project README:

Tuist Badge

[![Tuist Badge](https://img.shields.io/badge/powered%20by-Tuist-green.svg?longCache=true)](https://github.com/tuist)

Donations

Tuist is a non-profit project run entirely by unpaid volunteers. We need your funds to pay for software, hardware and hosting around continuous integration and future improvements to the project. Every donation will be spent on making Tuist better for our users.

Please consider a regular donation through Patreon:

Donate with Patreon

Open source

Tuist is a proud supporter of the Software Freedom Conservacy

Become a Conservancy Supporter!

Github

link
Stars: 76
Help us keep the lights on

Used By

Total:

Releases

0.5.0 - Sep 11, 2018

Added

  • Support for JSON and Yaml manifests https://github.com/tuist/tuist/pull/110 by @pepibumur.
  • Generate .gitignore file when running init command https://github.com/tuist/tuist/pull/118 by @pepibumur.
  • Git ignore Xcode and macOS files that shouldn't be included on a git repository https://github.com/tuist/tuist/pull/124 by @pepibumur.
  • Focus command https://github.com/tuist/tuist/pull/129 by @pepibumur.

Fixed

  • Snake-cased build settings keys https://github.com/tuist/tuist/pull/107 by @pepibumur.

0.4.0 - Aug 24, 2018

Added

  • Throw an error if a library target contains resources https://github.com/tuist/tuist/pull/98 by @pepibumur.
  • Playgrounds support https://github.com/tuist/tuist/pull/103 by @pepibumur.
  • Faster installation using bundled releases https://github.com/tuist/tuist/pull/104 by @pepibumur.

Changed

  • Don't fail if a Carthage framework doesn't exist. Print a warning instead https://github.com/tuist/tuist/pull/96 by @pepibuymur
  • Missing file errors are printed together https://github.com/tuist/tuist/pull/98 by @pepibumur.

0.3.0 - Aug 20, 2018

Added

  • Homebrew formula https://github.com/tuist/tuist/commit/0ab1c6e109134337d4a5e074d77bd305520a935d by @pepibumur.

Changed

  • Replaced ssh links with the https version of them https://github.com/tuist/tuist/pull/91 by @pepibumur.

Fixed

  • FRAMEWORK_SEARCH_PATHS build setting not being set for precompiled frameworks dependencies https://github.com/tuist/tuist/pull/87 by @pepibumur.

0.2.0 - Aug 5, 2018

Added

  • Install command https://github.com/tuist/tuist/pull/83 by @pepibumur.
  • --help-env command to tuistenv by @pepibumur.

Fixed

  • Fix missing target dependencies by @pepibumur.

Removed

  • Internal deprecation warnings by @pepibumur.

0.1.0 - Jul 31, 2018

Added

  • Local command prints all the local versions if no argument is given https://github.com/tuist/tuist/pull/79 by @pepibumur.
  • Platform, product, path and name arguments to the init command https://github.com/tuist/tuist/pull/64 by @pepibumur.
  • Lint that Info.plist and .entitlements files are not copied into the target products https://github.com/tuist/tuist/pull/65 by @pepibumur
  • Lint that there's only one resources build phase https://github.com/tuist/tuist/pull/65 by @pepibumur.
  • Command runner https://github.com/tuist/tuist/pull/81/ by @pepibumur.

Added

  • Sources, resources, headers and coreDataModels property to the Target model https://github.com/tuist/tuist/pull/67 by @pepibumur.

Changed

  • JSON and JSONConvertible replaced with Swift's Codable conformance.

Removed

  • The scheme attribute from the Project model https://github.com/tuist/tuist/pull/67 by @pepibumur.
  • Build phases and build files https://github.com/tuist/tuist/pull/67 by @pepibumur.