Change8

v1.7.0

📦 huggingface-hubView on GitHub →
10 features🐛 4 fixes🔧 9 symbols

Summary

This release significantly upgrades the `hf` CLI, introducing support for pip-installable Python extensions, a new extension discovery command, and quality-of-life improvements across authentication and listing commands. Optimizations were also applied to `hf-xet` uploads and downloads.

Migration Steps

  1. For Homebrew users, run `brew update`; Homebrew handles the renaming of the Hugging Face CLI formula from its previous name to `hf` automatically.

✨ New Features

  • CLI extensions now support pip-installable Python packages in addition to shell scripts, allowing extensions to use Python dependencies in isolated environments.
  • Introduced `hf extensions search` command to discover available extensions on GitHub repositories tagged with `hf-extension`.
  • Added `--force` flag to `hf auth login` to explicitly force the full login flow, useful for switching tokens.
  • Added `num_parameters` filtering capability to `hf` API and CLI.
  • Normalized all list/ls commands in the CLI to use the `list | ls` alias.
  • Added `--format` and `--quiet` options to `hf papers ls` command.
  • Added hidden `--json` shorthand for `--format json` in the CLI.
  • Allowed specifying a default directory for `hf skills add` command.
  • Added `used_storage` field to ModelInfo, DatasetInfo, and SpaceInfo structures.
  • Ensured all expand attributes are official ModelInfo/DatasetInfo/SpaceInfo attributes.

🐛 Bug Fixes

  • Fixed an issue where `snapshot_download` operation raised a generic exception even when a more specific error occurred.
  • Optimized `hf-xet` uploads by avoiding duplicate sha256 computation when uploading to a model/dataset repo.
  • Optimized `hf-xet` by skipping sha256 computation when uploading to a bucket.
  • Fixed deadlocks/stalls during large file downloads via `hf-xet` (due to v1.4.2 bump).

Affected Symbols