{
  "slug": "hf-models-datasets-and-spaces-ls-lists-files-by-repo-id-dc7420cdb84b",
  "title": "hf models, datasets, and spaces ls lists files by repo ID",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-30T11:48:16.000Z",
  "announced_at": "2026-04-30T11:48:16.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When inspecting a Hugging Face Hub repository, pass its repo ID to `hf models ls`, `hf datasets ls`, or `hf spaces ls` to list files. Add `--tree`, `-R`, `-h`, or `--revision <revision>` to adjust the listing.",
    "examples": [
      "hf models ls <owner>/<model> --tree -h",
      "hf datasets ls <owner>/<dataset> -R -h",
      "hf spaces ls <owner>/<space> --tree -R -h"
    ],
    "gotchas": [
      "Version: v1.13.0",
      "REPO_ID: Model, dataset, or Space ID; when supplied, lists files in that repo. Without it, lists Hub repositories of that type.",
      "--tree: List files in tree format; applies only to file listings.",
      "-R, --recursive: List files recursively; applies only to file listings.",
      "-h, --human-readable: Show sizes in human-readable format; applies only to file listings.",
      "--revision TEXT: Select a Git revision by branch name, tag, or commit hash.",
      "Prerequisite: Install the `hf` CLI; it is included with `huggingface_hub` or can be installed with the standalone installer. The docs do not state an auth prerequisite for public repo file listings."
    ]
  },
  "why_it_matters": "When inspecting a Hub repository during code work, list its files and optionally view them recursively, as a tree, with human-readable sizes, or at a revision.",
  "before": "Use `hf models ls`, `hf datasets ls`, or `hf spaces ls` to list repos; use `hf buckets ls <bucket_id>` to list files in a bucket.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.13.0",
    "https://github.com/huggingface/huggingface_hub/pull/4166",
    "https://github.com/huggingface/huggingface_hub/blob/v1.13.0/docs/source/en/guides/cli.md",
    "https://github.com/huggingface/huggingface_hub/blob/v1.13.0/docs/source/en/package_reference/cli.md"
  ],
  "rank": 0.98054,
  "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-bb06c8ee38e25564-1:gate",
    "evidence_hash": "8f11d99c2b64c04df88abf2e4573c6956cf9e268985d5a90173daf68c79513ac"
  },
  "review": {
    "draft_hash": "c7045f67bf049b4e8d161175a15130d42de4a59e81ab623441edc7bcbbb1c801",
    "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.98 >= 0.9; 2 needed) and Jev gave 0.84 (>= 0.6 needed)."
  }
}
