Change8

v1.13.0

Breaking Changes
📦 huggingface-hubView on GitHub →
2 breaking10 features🐛 4 fixes🔧 17 symbols

Summary

This release significantly enhances the CLI with new commands for repository exploration, Space management, and global output formatting. It also centralizes URI parsing logic and replaces the blocking auto-update prompt with an explicit `hf update` command.

⚠️ Breaking Changes

  • The blocking interactive Y/n auto-update prompt at CLI startup has been removed. Automation relying on this prompt will now hang unless the new `hf update` command is used or `HF_HUB_DISABLE_UPDATE_CHECK=1` is set.
  • The old method for uploading local scripts to Jobs using base64 encoding in an environment variable has been removed. Jobs scripts are now transported via bucket/mount, requiring jobs to read scripts from `/data/` inside the container.

Migration Steps

  1. If relying on the startup auto-update prompt for automation, switch to calling `hf update` explicitly or set the environment variable `HF_HUB_DISABLE_UPDATE_CHECK=1`.
  2. If using Jobs script uploads, ensure scripts are read from `/data/` within the job container, as the old base64 environment variable transport is removed.
  3. If you were using per-command formatting flags like `--format` or `--json`, these are now global and should work on all commands automatically.

✨ New Features

  • Added new CLI commands: `hf models card`, `hf datasets card`, and `hf spaces card` to fetch and print repository READMEs, supporting `--metadata` (YAML frontmatter as JSON) and `--text` flags.
  • CLI file listing commands (`hf models ls`, `hf datasets ls`, `hf spaces ls`) now list files inside a repository, mirroring `hf buckets ls` behavior with options like `--tree`, `-R`, `-h`, and `--revision`.
  • Introduced `hf datasets leaderboard <dataset_id>` to display model scores submitted to a benchmark dataset from the terminal.
  • Added `hf spaces pause`, `hf spaces restart`, and `hf spaces settings` subcommands for managing Space lifecycle and configuration via CLI.
  • Added `hf spaces hardware` command to list available hardware options and pricing for Spaces.
  • Replaced the interactive auto-update prompt with a non-blocking warning suggesting the new `hf update` command, which handles upgrades based on installation method (Homebrew, standalone, pip).
  • Global output formatting flags (`--format`, `--json`, `-q`/`--quiet`) are now supported by every `hf` command.
  • Introduced `parse_hf_uri` function and `HfUri` dataclass for centralized parsing of `hf://...` strings, handling models, datasets, spaces, buckets, revisions, and paths.
  • Introduced `parse_hf_mount` and `HfMount` for parsing volume mount specifications like `hf://...:/mnt:ro`.
  • Jobs script uploads now use bucket transport, mounting scripts to `/data/` inside the job container, which supports read-write access for persisting output artifacts.

🐛 Bug Fixes

  • Fixed `hf_hub_download` crashing when stderr lacks a real file descriptor.
  • Fixed rendering of tables for `hf datasets list` output.
  • Fixed installation method detection for `hf` when installed via curl using a Homebrew Python environment.
  • Avoided reuploading LFS files that were already uploaded when using `upload-large-folder`.

Affected Symbols