vercel whoami
The vercel whoami command is used to show the username of the user currently logged into Vercel CLI.
In a terminal, the command also shows your active team and its plan, so you can check which team your commands run in. When you pipe the output to another command or redirect it to a file, the command prints only the username. If you're not logged in, the command exits with code 1.
vercel whoamiUsing the vercel whoami command to view the username
of the user currently logged into Vercel CLI.
These are options that only apply to the vercel whoami command.
To read your account details and active team in a script, use the --json option:
vercel whoami --jsonUsing the vercel whoami command with the --json option.
The JSON output includes:
username,email, andname: The account you're logged in asteam: The active team, with itsid,slug,name, andplan
To print your username without contacting Vercel, use the --cached option:
vercel whoami --cachedUsing the vercel whoami command with the --cached option.
The command prints the username that Vercel CLI saved the last time it looked up your account. It doesn't show the active team. If no username is saved, the command asks Vercel as usual.
The saved username can be out of date. To confirm that your login still works, run vercel whoami without --cached. The --cached option is available in Vercel CLI 65.0.0 and later.
The following global options can be passed when using the vercel whoami command:
For more information on global options and their usage, refer to the options section.
Was this helpful?