hf models, datasets, and spaces card fetch repo READMEs
Introduced 2026-04-30 · score 0.98
HOW TO USE IT
When reviewing a Hub model, dataset, or Space, run the matching `hf … card <repo_id>` command to print its README; add `--metadata` for metadata, `--text` for prose, or `--metadata --format json` for JSON metadata. The documented card commands require the repo ID; metadata and text selection are mutually exclusive.
hf models card <model_id>hf datasets card <dataset_id>hf spaces card <space_id>WHY THIS HELPS
When reviewing a Hub model, dataset, or Space while working on code, fetch its README and inspect the full card or just its metadata or prose.
BEFORE THIS CHANGE
Use `hf download <repo_id> README.md` or curl to obtain the raw README; the release description says those approaches write to a file and do not split the card.
REQUIREMENTS AND LIMITATIONS
- Version: v1.13.0
- MODEL_ID / DATASET_ID / SPACE_ID (required): Hub repository ID for the model, dataset, or Space whose card to fetch.
- --metadata: Output only card metadata from YAML frontmatter.
- --text: Output only the card text body, without metadata. Mutually exclusive with `--metadata`.
- --format json: Formats output as JSON; the guide documents this with `--metadata` to output metadata as JSON.
- --token TEXT: User Access Token option for card commands.
- Docs conflict: The `v1.13.0` release evidence documents `--format json` for card commands, while the currently accessible package reference does not list that option for the model and dataset card commands. The versioned v1.13.0 documentation URLs were inaccessible; Space card syntax was available only in a later versioned guide.
FIRST-PARTY EVIDENCE
- https://github.com/huggingface/huggingface_hub/releases/tag/v1.13.0
- https://github.com/huggingface/huggingface_hub/pull/4118
- https://huggingface.co/docs/huggingface_hub/en/guides/cli
- https://huggingface.co/docs/huggingface_hub/v1.29.0/en/guides/cli
- https://huggingface.co/docs/huggingface_hub/en/package_reference/cli
Check the installed version and the source before using it. Entry JSON