> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magnet.run/llms.txt
> Use this file to discover all available pages before exploring further.

# magnet whoami

> Show the user or workspace the CLI is authenticated as.

The `magnet whoami` command shows the identity behind your current credentials — your user account when logged in via [`magnet login`](/cli/login), or the workspace when `MAGNET_API_KEY` is set.

## Usage

```bash theme={null}
magnet whoami
```

```json theme={null}
{
  "id": "user_2abc...",
  "email": "you@example.com",
  "firstName": "Ada",
  "lastName": "Lovelace"
}
```

<Note>
  `MAGNET_API_KEY` takes precedence: if it's set, `whoami` reports the workspace that owns the key, even if you're also logged in as a user.
</Note>

## Related

* [`magnet login`](/cli/login)
* [`magnet logout`](/cli/logout)
