Skip to content

av whoami

Show the email you are signed in as and the API base URL the CLI will target.

Terminal window
av whoami [flags]

av whoami reads the local CLI config only - it makes no API request. When a session token is stored it prints the email recorded at login and the API base URL:

Logged in as [email protected]
API: https://alertavuln.com

When no token is stored it prints Not logged in.

The API: line reflects the URL resolved for this invocation. The API URL is never persisted to the config file - every run starts from the production default and applies --api-url or ALERTAVULN_API_URL on top - so whoami is a quick way to confirm which deployment a command would hit.

Flag Default Description
--api-url https://alertavuln.com API base URL (global flag; changes the API: line for this invocation)

Check who you are signed in as:

Terminal window
av whoami

Confirm which API host an override would target:

Terminal window
av whoami --api-url https://alertavuln.example.com

Guard a script: sign in only when no session is stored:

Terminal window
av whoami | grep -q '^Logged in' || av login
Code Meaning
0 Command ran - whether or not a token is stored
1 The CLI config could not be loaded