From 435ae3a792814a577cb6f18b12d0fa774b9eae0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fo=C5=99t?= Date: Wed, 19 Feb 2025 11:40:42 +0100 Subject: [PATCH] Remove default subcommand of tuist auth in favor of calling tuist auth login explicitly (#7328) --- Sources/TuistKit/Commands/Auth/AuthCommand.swift | 3 +-- Templates/default/Tuist.stencil | 2 +- docs/docs/en/contributors/get-started.md | 2 +- docs/docs/en/guides/quick-start/gather-insights.md | 2 +- docs/docs/en/guides/quick-start/optimize-workflows.md | 2 +- docs/docs/en/guides/share/previews.md | 2 +- docs/docs/en/server/introduction/authentication.md | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Sources/TuistKit/Commands/Auth/AuthCommand.swift b/Sources/TuistKit/Commands/Auth/AuthCommand.swift index 0421fe8aac9..f6e5b44a3c9 100644 --- a/Sources/TuistKit/Commands/Auth/AuthCommand.swift +++ b/Sources/TuistKit/Commands/Auth/AuthCommand.swift @@ -10,8 +10,7 @@ struct AuthCommand: ParsableCommand { LoginCommand.self, LogoutCommand.self, WhoamiCommand.self, - ], - defaultSubcommand: LoginCommand.self + ] ) } } diff --git a/Templates/default/Tuist.stencil b/Templates/default/Tuist.stencil index 4733e16ffcd..9c1539d8e99 100644 --- a/Templates/default/Tuist.stencil +++ b/Templates/default/Tuist.stencil @@ -1,7 +1,7 @@ import ProjectDescription let tuist = Tuist( -// Create an account with "tuist auth" and a project with "tuist project create" +// Create an account with "tuist auth login" and a project with "tuist project create" // then uncomment the section below and set the project full-handle. // * Read more: https://docs.tuist.io/guides/quick-start/gather-insights // diff --git a/docs/docs/en/contributors/get-started.md b/docs/docs/en/contributors/get-started.md index fb9968052e4..3c7953b1bfa 100644 --- a/docs/docs/en/contributors/get-started.md +++ b/docs/docs/en/contributors/get-started.md @@ -28,7 +28,7 @@ To start working on the project, we can follow the steps below: - [Install](https://mise.jdx.dev/getting-started.html) Mise to provision the development environment. - Run `mise install` to install the system dependencies needed by Tuist - Run `tuist install` to install the external dependencies needed by Tuist -- (Optional) Run `tuist auth` to get access to the Tuist Cache +- (Optional) Run `tuist auth login` to get access to the Tuist Cache - Run `tuist generate` to generate the Tuist Xcode project using Tuist itself **The generated project opens automatically**. If you need to open again without generating it, run open `Tuist.xcworkspace` (or use Finder). diff --git a/docs/docs/en/guides/quick-start/gather-insights.md b/docs/docs/en/guides/quick-start/gather-insights.md index d79f002fa8e..3113a6af876 100644 --- a/docs/docs/en/guides/quick-start/gather-insights.md +++ b/docs/docs/en/guides/quick-start/gather-insights.md @@ -11,7 +11,7 @@ Tuist can integrate with a server to extend its capabilities. One of those capab First of all, you'll need to authenticate by running: ```bash -tuist auth +tuist auth login ``` ## Create a project {#create-a-project} diff --git a/docs/docs/en/guides/quick-start/optimize-workflows.md b/docs/docs/en/guides/quick-start/optimize-workflows.md index bf4c8aa83e7..42d52a7f6b5 100644 --- a/docs/docs/en/guides/quick-start/optimize-workflows.md +++ b/docs/docs/en/guides/quick-start/optimize-workflows.md @@ -42,7 +42,7 @@ If you push your changes upstream to a remote repository, other developers can c ```bash tuist install -tuist auth +tuist auth login tuist generate ``` diff --git a/docs/docs/en/guides/share/previews.md b/docs/docs/en/guides/share/previews.md index 3692dbd43d9..42782c87d67 100644 --- a/docs/docs/en/guides/share/previews.md +++ b/docs/docs/en/guides/share/previews.md @@ -67,7 +67,7 @@ To make running Tuist Previews even easier, we developed a Tuist macOS menu bar When you now click on "Run" in the Preview page, the macOS app will automatically launch it on your currently selected device. > [!IMPORTANT] REQUIREMENTS -> To download Previews, you need to first authenticate with the `tuist auth` command. +> To download Previews, you need to first authenticate with the `tuist auth login` command. > In the future, you will be able to authenticate directly in the app. > > Additionally, you need to have Xcode locally installed. diff --git a/docs/docs/en/server/introduction/authentication.md b/docs/docs/en/server/introduction/authentication.md index 8975c8a0666..c211a6ebc0d 100644 --- a/docs/docs/en/server/introduction/authentication.md +++ b/docs/docs/en/server/introduction/authentication.md @@ -13,7 +13,7 @@ To interact with the server, the CLI needs to authenticate the requests using [b When using the CLI locally on your machine, we recommend authenticating as a user. To authenticate as a user, you need to run the following command: ```bash -tuist auth +tuist auth login ``` The command will take you through a web-based authentication flow. Once you authenticate, the CLI will store a long-lived refresh token and a short-lived access token under `~/.config/tuist/credentials`. Each file in the directory represents the domain you authenticated against, which by default should be `cloud.tuist.io.json`. The information stored in that directory is sensitive, so **make sure to keep it safe**.