Overview
Thetuist auth command manages authentication with Tuist Server. It allows you to log in, log out, check your current authentication status, and refresh authentication tokens.
Usage
Subcommands
tuist auth login
Log in to Tuist Server with your email and password.
tuist auth logout
Remove the existing Tuist session and log out.
tuist auth whoami
Display the user’s email identity currently authenticated and in use.
tuist auth refresh-token
Refresh the authentication token for a particular server URL. This command is typically used internally and is not displayed in help output.
Options
For tuist auth login
Email to authenticate with. If not provided, you will be prompted interactively.
Password to authenticate with. If not provided, you will be prompted interactively.
The URL of the server to authenticate with. Defaults to the official Tuist Server.
For tuist auth logout
The path to the directory or a subdirectory of the project.
Short form of
--path.The URL of the server to log out from.
For tuist auth whoami
The path to the directory or a subdirectory of the project.
Short form of
--path.The URL of the server to check authentication status.
For tuist auth refresh-token
The URL of the server the token is being refreshed for.
Examples
Log in interactively
Log in with credentials
Log in to a custom server
Check who is logged in
Check authentication for a custom server
Log out
Log out from a custom server
Refresh authentication token
Authentication workflow
A typical authentication workflow looks like this:-
Login: Authenticate with your Tuist Server credentials
-
Verify: Check your authentication status
- Use Tuist features: Access remote caching, analytics, and other server features
-
Logout: Remove your session when needed
Environment variables
Thetuist auth commands support environment variables for some options:
TUIST_LOGOUT_PATH: Sets the path fortuist auth logoutTUIST_WHOAMI_PATH: Sets the path fortuist auth whoamiTUIST_AUTH_REFRESH_TOKEN_SERVER_URL: Sets the server URL fortuist auth refresh-token
Security considerations
Credential storage
Authentication tokens are stored securely on your local machine.
Password input
When possible, use interactive login to avoid passing passwords as command-line arguments, which may be visible in shell history.
Token refresh
Tokens are automatically refreshed as needed to maintain your session.
Multiple servers
You can authenticate with multiple server instances using the
--url option.Use cases
CI/CD authentication
For continuous integration, you can use environment variables or command-line options:Consider using secure credential storage in your CI/CD platform rather than hardcoding credentials in scripts.
Team collaboration
Authenticate to access shared remote cache and analytics:Self-hosted Tuist Server
If you’re running a self-hosted Tuist Server:Troubleshooting
Authentication fails
If login fails, verify:- Your email and password are correct
- The server URL is accessible
- You have a stable internet connection
Token expired
If you receive authentication errors, try refreshing your token:Multiple server instances
If working with multiple server instances, always specify the--url option to target the correct server: