---
title: vercel whoami
description: Learn how to display the username of the currently logged in user with the vercel whoami CLI command.
url: "https://vercel.com/docs/cli/whoami"
last_updated: 2026-03-17
related:
  - /docs/cli/global-options
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# vercel whoami

The `vercel whoami` command is used to show the username of the user currently logged into [Vercel CLI](/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`.

## Usage

```bash filename="terminal"
vercel whoami
```

*Using the \`vercel whoami\` command to view the username
of the user currently logged into Vercel CLI.*

## Unique options

These are options that only apply to the `vercel whoami` command.

### JSON

To read your account details and active team in a script, use the `--json` option:

```bash filename="terminal"
vercel whoami --json
```

*Using the \`vercel whoami\` command with the \`--json\` option.*

The JSON output includes:

- `username`, `email`, and `name`: The account you're logged in as
- `team`: The active team, with its `id`, `slug`, `name`, and `plan`

### Cached

To print your username without contacting Vercel, use the `--cached` option:

```bash filename="terminal"
vercel whoami --cached
```

*Using 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.

## Global Options

The following [global options](/docs/cli/global-options) can be passed when using the `vercel whoami` command:

- [`--cwd`](/docs/cli/global-options#current-working-directory)
- [`--debug`](/docs/cli/global-options#debug)
- [`--global-config`](/docs/cli/global-options#global-config)
- [`--help`](/docs/cli/global-options#help)
- [`--local-config`](/docs/cli/global-options#local-config)
- [`--no-color`](/docs/cli/global-options#no-color)
- [`--non-interactive`](/docs/cli/global-options#non-interactive)
- [`--scope`](/docs/cli/global-options#scope)
- [`--token`](/docs/cli/global-options#token)
- [`--version`](/docs/cli/global-options#version)

For more information on global options and their usage, refer to the [options section](/docs/cli/global-options).

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
