Skip to content

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Oct 6, 2025

Mentioned on internal slack

Every time you run a command, it checks the latest version on GitHub (it's hidden for maybe one day) and prompts you to update to the latest release.

With this PR, any CLI command will trigger an auto-check of the latest version available on PyPI and suggest the user to upgrade if a new version is available. This autocheck is disabled if user is running on a .dev or .rc version. The check is done only once every 24h to avoid spamming user. If any exception is raised in the process, it will fail silently and do not stop the CLI command.

A utility method has been added to check if huggingface_hub package has been installed via the HF installer (e.g. curl ... | sh), via Homebrew or via pip (default). This allows us to print a personalized message on how to autoupdate.


Example:

(note: fake example as it wouldn't be triggered on a dev version)

Screenshot from 2025-10-06 16-35-41

@Wauplin Wauplin requested a review from hanouticelina October 6, 2025 15:19
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor Author

Wauplin commented Oct 7, 2025

@hanouticelina this one is ready for review now :)

Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice addition!

Wauplin and others added 2 commits October 8, 2025 09:14
Co-authored-by: célina <hanouticelina@gmail.com>
@Wauplin Wauplin requested a review from hanouticelina October 8, 2025 07:22
Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool, thank you @Wauplin!
while you're at it, could you update the windows command everywhere (including the docs) to
powershell -ExecutionPolicy ByPass -c "irm https://hf.co/cli/install.ps1 | iex"

Changing the execution policy allows running a script from the internet.
(taken from astral installation guide)

@Wauplin Wauplin merged commit 1ddb16f into v1.0-release Oct 8, 2025
20 checks passed
@Wauplin Wauplin deleted the check-for-updates branch October 8, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants