auth command helps you manage authentication and account profiles for the Xata CLI.
Subcommands
login
Log in to a Xata account.Environment to log in to (
prod|custom, default: prod)Profile to log in to (default:
default)Force login even if already logged in
Print help information and exit
Custom environment flags
For Enterprise customers we allow connecting the CLI to a custom deployment in their cloud. They can configure it with thecustom environment.
When using --env custom, you can provide additional configuration:
Issuer URL for custom environment (required for custom environments)
API base URL for custom environment (required for custom environments)
Client secret for custom environment (required for custom environments)
Client ID for custom environment (defaults to
cli)logout
Log out of the current account.Profile to log out of (default:
default)Do not ask for confirmation, assume yes
Print help information and exit
status
Display active account and authentication state.Profile to log in to (default:
default)Print help information and exit
switch
Switch to a different Xata account profile.The profile to switch to
Print help information and exit
access-token
Print the current access token.Profile to log in to (default:
default)Print help information and exit
refresh-token
Print the current refresh token.Profile to log in to (default:
default)Print help information and exit
Global Flags
Print help information and exit