This proposal outlines the rationale for creating a Tuist Fastlane Plugin.
Fastlane is a widely used automation tool in iOS development, supporting a plugin system that allows developers to extend its functionality. Given Tuist’s role in extending Apple tooling, it makes sense to integrate it as a Fastlane plugin.
Currently, developers who want to use Tuist via Fastlane must manually wrap Tuist command executions in Fastlane’s shell lane, like this:
sh(command: "tuist", "test", "App")
This approach lacks documentation and requires developers to remember Tuist commands and their parameters, leading to a suboptimal development experience (DX). A dedicated Tuist Fastlane Plugin would significantly improve DX and promote wider adoption of Tuist.
Tuist Fastlane Plugin
Plugin APIs
The Tuist Fastlane Plugin will be optimized for CI use, meaning user-interactive commands will not be supported.
The plugin will expose the following Tuist commands:
• build
• clean
• generate (always executed with the --no-open flag)
• install
• test
• cache, auth, and logout (to support caching features)
• plugin
Each command will be represented as a separate Fastlane action. For example:
tuist_install(
path: "/path/to/project", # optional
update: true # optional
)
Tuist CLI Installation
Since Fastlane plugins are distributed as Ruby gems, the plugin cannot automatically install command-line tools. Therefore, developers must install the Tuist CLI on their machines. Tuist can be installed using mise (recommended), Homebrew, or a script.
The plugin will check if Tuist is installed and provide an early error message if it is missing.
Alternatives Considered:
-
Bundling the Tuist CLI:
• This would package Tuist with the plugin, but it would require frequent updates, one for each new Tuist release (e.g., the Sentry Fastlane plugin uses this approach). -
Allowing developers to specify the Tuist version:
• Since Tuist is installed globally and tied to the project directory, requiring the binary location for each lane would degrade the DX.
Action Plan
- Create a fastlane-plugin-tuist repository under the Tuist organization.
- Implement the fastlane-plugin-tuist.
- Distribute the plugin via RubyGems.
- Automate the distribution process.
Summary
The Tuist Fastlane Plugin aims to streamline the use of Tuist within Fastlane, enhancing the developer experience and encouraging broader adoption. By offering well-documented and intuitive Fastlane actions for core Tuist commands, the plugin will simplify automation in CI pipelines. With a clear installation process and thoughtful design choices, this plugin will bridge the gap between Tuist and Fastlane for iOS developers.