CLI reference

Whoami CLI command reference

Reference documentation for the Sanity CLI whoami command.

USAGE
  $ sanity whoami [--json]

GLOBAL FLAGS
      --json  Format 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

Was this page helpful?

Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change site theme