{
  "slug": "hf-auth-whoami-supports-json-format-ae445463ede5",
  "title": "hf auth whoami supports JSON format",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-20T11:25:19.000Z",
  "announced_at": "2026-03-20T11:25:19.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a script needs the authenticated Hugging Face identity as JSON, run `hf auth whoami --format json`.",
    "examples": [
      "hf auth whoami --format json"
    ],
    "gotchas": [
      "Version: v1.7.2",
      "--format json: Selects JSON output; the command’s default format is table.",
      "Prerequisite: A locally available Hugging Face token is needed to retrieve the authenticated identity; if no token is found, the command reports “Not logged in” and exits.",
      "Prerequisite: Install the CLI, for example with `pip install -U huggingface_hub`.",
      "Docs conflict: The v1.7.2 CLI guide says `hf auth whoami` has no options, but the same-version CLI reference and source define `--format`; the source shows the JSON option is implemented."
    ]
  },
  "why_it_matters": "Check the authenticated identity in a script that consumes JSON output.",
  "before": "The command printed the username and organizations in its default human-readable output.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.7.2",
    "https://github.com/huggingface/huggingface_hub/blob/v1.7.2/src/huggingface_hub/cli/auth.py",
    "https://github.com/huggingface/huggingface_hub/blob/v1.7.2/docs/source/en/guides/cli.md"
  ],
  "rank": 0.95024,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-b86c7edc932849cf-2:gate",
    "evidence_hash": "d3c23d0172d3729fda7337b66fe19b678052825a93513b3ec9379d897ed2784c"
  },
  "review": {
    "draft_hash": "d9ff01515bb5e1e420da596a2a08f5a0167aef50a6d7e562214253d1405fdf92",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
