How to Install Tuist
Install Tuist to generate and maintain Xcode projects with consistent settings.
When developing iOS projects, managing Xcode project configurations can be a challenge. Tuist streamlines this process by not only generating Xcode projects but also managing dependencies, ensuring a consistent and organized project structure.
Here’s a simplified guide to get Tuist installed on your system.
1. Recommended Installation: Mise
The preferred method to install Tuist is through Mise, a tool that allows you to deterministically manage and activate versions of Tuist. Mise ensures each environment uses the same version of Tuist, making it ideal for teams or projects with strict versioning requirements.
Installing Mise
First, install Mise. Once you have Mise set up, you can install Tuist with these commands:
1
2
3
mise install tuist # Installs the version specified in .mise.toml
mise install tuist@x.y.z # Installs a specific version
mise install tuist@3 # Installs a major version (fuzzy version)
To activate a specific version of Tuist:
1
2
3
4
mise use tuist@x.y.z # Use Tuist in the current project
mise use tuist@latest # Use the latest version of Tuist
mise use -g tuist@x.y.z # Use this version globally
mise use -g tuist@system # Use the system's version of Tuist globally
Mise ensures that the correct version of Tuist is always used in the appropriate environment, making it a better choice over alternatives like Homebrew.
2. Alternative Installation: Homebrew
If version pinning across different environments isn’t a priority for you, Tuist can also be installed via Homebrew:
1
2
3
brew tap tuist/tuist
brew install tuist # Installs the latest version
brew install tuist@x.y.z # Installs a specific version
This method installs Tuist globally, making it available in any directory from your terminal.
3. Shell Completions
To streamline your use of Tuist, you can enable shell autocompletion for Bash or Zsh.
Zsh
For Zsh, you can generate and add a completion script using Oh my zsh:
1
tuist --generate-completion-script > ~/.oh-my-zsh/completions/_tuist
If you don’t use oh-my-zsh, add this to your .zshrc file:
1
2
3
fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinit
Then, generate the completion script:
1
tuist --generate-completion-script > ~/.zsh/completion/_tuist
Bash
For Bash, simply run:
1
tuist --generate-completion-script > /usr/local/etc/bash_completion.d/_tuist
If you don’t have bash-completion installed, you can source the completion script directly:
1
source ~/.bash_completions/_tuist
With these simple steps, you’ll have Tuist installed and configured, allowing you to focus on building Xcode projects more efficiently.
☕ Support My Work
If you found this post helpful and want to support more content like this, you can buy me a coffee!
Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏