in dell_ai/cli/main.py [0:0]
def auth_status() -> None:
"""
Show the current authentication status and user information.
"""
if not auth.is_logged_in():
typer.echo("Status: Not logged in")
typer.echo("To log in, run: dell-ai login")
return
try:
user_info = auth.get_user_info()
typer.echo("Status: Logged in")
typer.echo(f"User: {user_info.get('name', 'Unknown')}")
typer.echo(f"Email: {user_info.get('email', 'Not available')}")
typer.echo(
f"Organizations: {', '.join([org.get('name', 'Unknown') for org in user_info.get('orgs', [])])}"
)
except AuthenticationError as e:
typer.echo(f"Status: Error ({str(e)})")
typer.echo("Please try logging in again: dell-ai login")
raise typer.Exit(code=1)