Skip to content
Nilay Kabariya

Entry No.098·AI··5 min read

huggingface-cli: command not found (removed in 1.0, not 2.0)

huggingface-cli stopped working in huggingface_hub 1.0.0, returned as a do-nothing stub in 1.10.1 and is gone in 2.0. All versions tested, plus the hf commands.

by Nilay#huggingface#python#cliAI

The error, verbatim

Jump to the fix ↓
huggingface-cli: command not found

The fix that worked

Use the hf command that replaced it:

hf auth login
Not it? Every cause, tested ↓

Tested on

huggingface_hub
0.36.0, 1.0.0, 1.10.0, 1.10.1, 1.16.0, 1.17.0, 1.33.0, 2.0.0, 2.4.0
Python / OS
3.13.18, Ubuntu on GitHub Actions; 3.14.5, Windows 11 Pro (hf 2.4.0 commands)
Date
November 8, 2026

✓ Last re-run on GitHub Actions · see the run · all repros

huggingface-cli isn’t missing from your PATH. The huggingface_hub package simply doesn’t install it any more: the command was renamed to hf, and every huggingface-cli subcommand has an hf equivalent. It’s natural to blame the big 2.0 release of September 24, 2026. I installed nine versions side by side, and the command actually stopped working almost a year earlier, in 1.0.0 (October 27, 2025).

Use hf with the same arguments. The common ones:

Old command New command
huggingface-cli login hf auth login
huggingface-cli whoami hf auth whoami
huggingface-cli download … hf download …
huggingface-cli upload … hf upload …
huggingface-cli env hf env
huggingface-cli scan-cache hf cache ls
huggingface-cli delete-cache hf cache rm …
huggingface-cli repo create … hf repos create …

If hf isn’t found either, the package isn’t installed in the environment you’re running: pip install -U huggingface_hub there.

What each version gives you

The confusing part is that the command disappeared, came back as a stub that does nothing, and disappeared again. Each version below was installed into its own fresh virtual environment on November 8, 2026, then asked for whoami both ways:

Terminal log on GitHub Actions: huggingface_hub 0.36.0 installs hf and huggingface-cli and both work with a deprecation warning; 1.0.0 and 1.10.0 install only hf and huggingface-cli is command not found; 1.10.1 and 1.33.0 install a huggingface-cli that prints deprecated and no longer works and exits 1; 2.0.0 and 2.4.0 install only hf. hf auth whoami fails with ModuleNotFoundError: No module named 'click' on 1.0.0, 1.10.0 and 1.10.1.
Seven versions, one fresh venv each. Filtered to the command, its key line and the exit code. Full log.
huggingface_hub Released huggingface-cli
0.36.0 and older up to Oct 23, 2025 works, with a warning to use hf
1.0.0 to 1.10.0 Oct 27, 2025 to Apr 9, 2026 command not found
1.10.1 to 1.33.0 Apr 9 to Sep 24, 2026 exists, prints “huggingface-cli is deprecated and no longer works. Use hf instead.” and exits 1
2.0.0 and newer from Sep 24, 2026 command not found

So if you see “deprecated and no longer works”, you’re on a late 1.x release, and the command never ran your arguments; scripts that ignore the exit code may have been silently doing nothing since April. If you see command not found, you’re on 1.0 to 1.10.0 or on 2.x. Either way the fix is the same table above.

Upgrading in place gives the same result as a fresh install: a venv with 0.36.0 had both hf and huggingface-cli, and after pip install -U huggingface_hub==2.4.0 only hf was left.

Why alias huggingface-cli=hf doesn’t work

The tempting shortcut is an alias, so old scripts keep running. It only covers the commands whose names didn’t change. I tried the old subcommand names under hf 2.4.0 on Windows 11:

  • hf download …, hf upload … and hf lfs-enable-largefiles worked, because they kept their names.
  • hf whoami and hf login failed with Error: No such command 'whoami': they moved under hf auth.
  • hf scan-cache failed with Error: No such command 'scan-cache'. Did you mean 'cache'?. The cache commands are now hf cache ls, hf cache rm, hf cache prune and hf cache verify.
  • hf repo create failed too, with Error: No such command 'repo'. Did you mean 'repos'?: the group is now plural, hf repos create.

So for scripts, replace the commands one by one using the table above rather than aliasing. The error message at least names the problem, and hf <group> --help lists what’s inside each group.

If hf crashes with “No module named ‘click’”

This one surprised me. On the older 1.x releases, the replacement command was broken too when installed today:

ModuleNotFoundError: No module named 'click'

hf is built on the typer library, and versions 1.0.0 to 1.16.x of huggingface_hub accept any typer version. The typer that pip picks today, 0.28.0, no longer brings click along, so hf can’t start. From 1.17.0 on, huggingface_hub asks for click>=8.4.0 and typer<0.26.0 itself, and the problem is gone:

Terminal: huggingface_hub 1.10.0 and 1.16.0 installed with typer 0.28.0 crash with ModuleNotFoundError: No module named 'click'; after pip install click, hf auth whoami answers Error: Not logged in; 1.17.0 installs click 8.5.1 and typer 0.25.1 and works.
A pinned 1.x installed today, before and after adding click. A 'Not logged in' answer means the command works. Full log.

Upgrade huggingface_hub, or, if you must stay on that pin, add click to the same environment:

pip install click

This matters most for Docker images and requirements files that pin something like huggingface_hub==1.10.0: they built fine months ago, and a rebuild today pulls the newer typer.

Notebooks and Colab

In a notebook, !huggingface-cli login fails the same way, because it runs the same missing command. Use !hf auth login, or log in from Python, which never depended on the command at all:

from huggingface_hub import login
login()

The runs

On November 8, 2026, on GitHub Actions ubuntu-latest with Python 3.13.18: huggingface_hub 0.36.0, 1.0.0, 1.10.0, 1.10.1, 1.33.0, 2.0.0 and 2.4.0, each in a new venv, running huggingface-cli whoami and hf auth whoami without a token, plus an in-place upgrade from 0.36.0 to 2.4.0 and a real hf download on 2.4.0 (run.sh, run 42504610345). The click case ran 1.10.0, 1.16.0 and 1.17.0, before and after pip install click (click.sh, run 42504749744). Which versions declare the command and which require click comes from the entry_points.txt and METADATA inside each published wheel; release dates are from PyPI. The command table comes from hf --help, hf cache --help and hf repos --help on 2.4.0, and the alias checks ran on Windows 11 with Python 3.14.5 and huggingface_hub 2.4.0. Both scripts are in nk-repro/hf-cli.

— N.K., end of entry No.098

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.089

    module 'openai' has no attribute 'ChatCompletion', tested

    AttributeError: module 'openai' has no attribute 'ChatCompletion', or 'no longer supported in openai>=1.0.0'. Five SDK versions tested.

    > AttributeError: module 'openai' has no attribute 'ChatCompletion'

    AI4 min
  2. No.088

    Responses.create() unexpected keyword argument: new names

    max_tokens, messages, response_format, seed: their names in OpenAI's Responses API, tested. Plus the 'proxies' TypeError from httpx 0.28.

    > TypeError: Responses.create() got an unexpected keyword argument 'max_tokens'

    AI6 min
  3. No.087

    Claude SDK: unexpected keyword argument temperature, betas

    Messages.create() got an unexpected keyword argument after an anthropic upgrade, plus what SDK 2.0 (October 21) breaks next. Python and TypeScript, tested.

    > TypeError: Messages.create() got an unexpected keyword argument 'temperature'

    AI5 min

tip: paste the exact error text