跳至內容

安裝 Tuist

Tuist 命令列介面可在 macOS 和 Linux 上執行,並將您的 Xcode、產生的、Gradle 和 Bazel 專案連接至 Tuist 的快取、洞察與執行基礎設施。雖然您可以從原始碼建構 Tuist,但我們建議使用下列其中一種安裝方法,以確保安裝有效且可驗證。

Mise#

Note

如果您尚未安裝 Mise,請先參閱入門指南。如果您的團隊或組織需要確保不同環境中工具版本的一致性,Mise 是 Homebrew 的推薦替代方案。

與 Homebrew 等會在全域安裝並啟用單一版本工具的工具不同,Mise 會固定版本,可設為全域或限定於特定專案範圍。執行 mise use 以安裝並啟用 Tuist:

bash
mise use [email protected] # Install and pin tuist-x.y.z in the current project
mise use tuist@latest # Install and pin the latest tuist in the current project
mise use -g [email protected] # Install and pin tuist-x.y.z as the global default
mise use -g tuist@system # Use the system's tuist as the global default

如果您複製的專案已在 mise.toml 中固定了 Tuist 版本,請執行 mise install 來安裝它。

Tip

tuist@latest 會解析為最新的 穩定 版本。Tuist 也會發布預發行版(canary)與候選發布版(release candidate);這些版本僅供選擇性加入,且絕不會由 latest 解析。請參閱 Release channels,了解如何固定您可信任的穩定版本線,以及如何選擇加入預發行版。

Linux 支援

在 Linux 上,Tuist 僅可透過 Mise 取得。依賴 Xcode 的命令(例如 tuist generate)在 Linux 上無法使用,但平台無關的命令(如 tuist inspect bundle)則可正常運作。

Homebrew(僅限 macOS){#recommended-homebrew}#

您可以使用 Homebrew 和 我們的 formula 來安裝 Tuist:

bash
brew tap tuist/tuist
brew install --formula tuist
brew install --formula [email protected]
驗證二進位檔的真偽

您可以執行以下命令來驗證安裝的二進位檔是否由我們建構,該命令會檢查憑證的團隊是否為 U6LC622NKF:

bash
curl -fsSL "https://docs.tuist.dev/verify.sh" | bash

HTTP 代理#

如果您的網路透過 HTTP 代理路由出站流量,請參閱 HTTP proxy guide。