File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ def get_version() -> str:
115115 entry_points = {
116116 "console_scripts" : [
117117 "hf=huggingface_hub.cli.hf:main" ,
118+ "huggingface-cli=huggingface_hub.cli.deprecated_cli:main" ,
118119 "tiny-agents=huggingface_hub.inference._mcp.cli:app" ,
119120 ],
120121 "fsspec.specs" : "hf=huggingface_hub.HfFileSystem" ,
Original file line number Diff line number Diff line change 1+ """Deprecated `huggingface-cli` entry point. Warns and exits."""
2+
3+ import shutil
4+ import sys
5+
6+ from ._output import out
7+
8+
9+ def main () -> None :
10+ out .warning ("`huggingface-cli` is deprecated and no longer works. Use `hf` instead.\n " )
11+
12+ if shutil .which ("hf" ):
13+ from huggingface_hub .cli ._cli_utils import check_cli_update
14+
15+ check_cli_update ("huggingface_hub" )
16+ out .hint ("`hf` is already installed! Use it directly.\n " )
17+ else :
18+ out .hint (
19+ "Install `hf`:\n "
20+ " Standalone (recommended): curl -LsSf https://hf.co/cli/install.sh | bash\n "
21+ " Using Homebrew: brew install hf\n "
22+ " Using pip: pip install huggingface_hub\n " ,
23+ )
24+
25+ out .hint (
26+ "Examples:\n "
27+ " hf auth login\n "
28+ " hf download unsloth/gemma-4-31B-it-GGUF\n "
29+ " hf upload my-cool-model . .\n "
30+ ' hf models ls --search "gemma"\n '
31+ " hf repos ls --format json\n "
32+ " hf jobs run python:3.12 python -c 'print(\" Hello!\" )'\n "
33+ " hf --help\n " ,
34+ )
35+ sys .exit (1 )
You can’t perform that action at this time.
0 commit comments