hf models, datasets, spaces, endpoints, and cache ls add format options
Introduced 2026-02-03 · score 0.96
HOW TO USE IT
When a repository maintenance script consumes one of the supported `ls` listings, select JSON with `--format json` or print IDs only with `--quiet` (`-q`).
hf models ls --format jsonhf datasets ls --quiethf cache ls --format jsonWHY THIS HELPS
When consuming CLI listings in repository maintenance scripts, request JSON or ID-only output from a supported listing command.
REQUIREMENTS AND LIMITATIONS
- Version: v1.4.0
- --format [table|json]: Selects table or JSON output; defaults to table.
- -q, --quiet: Prints only IDs, one per line. Documentation does not state whether this can be combined with `--format`.
FIRST-PARTY EVIDENCE
- https://github.com/huggingface/huggingface_hub/releases/tag/v1.4.0
- https://github.com/huggingface/huggingface_hub/pull/3735
- https://github.com/huggingface/huggingface_hub/blob/v1.4.0/docs/source/en/package_reference/cli.md
Check the installed version and the source before using it. Entry JSON