codekingpro/portable-devtools
114k
1"""Deprecated `huggingface-cli` entry point. Warns and exits."""2 3import shutil4import sys5 6from ._output import out7 8 9def 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_update14 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)36 