{
  "slug": "hf-auth-token-prints-the-current-token-10b21dac729f",
  "title": "hf auth token prints the current token",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-16T12:16:19.000Z",
  "announced_at": "2026-04-16T12:16:19.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need the current Hugging Face token for a whoami-v2 request, pipe `hf auth token` into curl with a Bearer authorization header.",
    "examples": [
      "hf auth token | xargs -I {} curl -H \"Authorization: Bearer {}\" https://huggingface.co/api/whoami-v2"
    ],
    "gotchas": [
      "Version: v1.11.0",
      "hf auth token (required): Prints the current access token to stdout; has no documented options beyond --help.",
      "Authorization: Bearer {} (required): Passes the token from `hf auth token` as the request's Bearer credential.",
      "https://huggingface.co/api/whoami-v2 (required): Request URL shown in the release-note example.",
      "Prerequisite: Be logged in with a stored token; otherwise `hf auth token` errors and directs you to run `hf auth login` first."
    ]
  },
  "why_it_matters": "Use the current Hugging Face token in a command that queries the whoami endpoint.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.11.0",
    "https://github.com/huggingface/huggingface_hub/blob/v1.11.0/docs/source/en/package_reference/cli.md",
    "https://github.com/huggingface/huggingface_hub/blob/v1.11.0/src/huggingface_hub/cli/auth.py"
  ],
  "rank": 0.99034,
  "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-25f6591b2baf7d10-4:gate",
    "evidence_hash": "f2303c219ad3347777096f587023f4458390ba61d10bcd955e485c9a490bd34e"
  },
  "review": {
    "draft_hash": "62a52fdb728c22b4d9ba1efaa9c179c0bbb1b6f12761f97695a51620f9d95cce",
    "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.99 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
