Skip to main content

Usage

phala whoami [options]

Options

FlagShortDefaultDescription
--json-jfalseOutput in JSON format
--api-token <token>Override API token for this command

Examples

$ phala whoami
user@example.com

JSON output

$ phala whoami --json
{
  "username": "user@example.com",
  "email": "user@example.com"
}

Use in scripts

$ CURRENT_USER=$(phala whoami)
$ echo "Deploying as $CURRENT_USER"
Deploying as user@example.com

Override API token

$ phala whoami --api-token phak_abc123...
other@example.com

Exit Codes

  • 0 - Successfully retrieved user information
  • 1 - Not authenticated or error occurred