> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Whoami CLI command reference

Reference documentation for the Sanity CLI whoami command.

**CLI output**

```sh
USAGE
  $ sanity whoami [--json]

FLAGS
      --json  Output as JSON

DESCRIPTION
  Show the user or API token the CLI is authenticated as

EXAMPLES
  Show the currently authenticated user

    $ sanity whoami

  Output the current user as JSON, for scripts and agents

    $ sanity whoami --json
```

