We are pleased to announce the much-anticipated quality of life improvements. The Huggingface CLI has been officially renamed HF by Huggingface-Cli.
So… why does this change?
Entering Huggingface-Cli will constantly get old fast and fast. More importantly, the command structure of the CLI has become messy as new features have been added over time (upload, download, cache management, repo management, etc.). Rename the CLI is your chance to reorganize the command into a clearer, more consistent format.
We decided not to reinvent the wheels and instead decided to follow the well-known CLI pattern: HF. This predictable grammar will allow for more ergonomic discovery of the Cli of the embrace face, setting the stage for future features.
Get started
You must install the latest Huggingface_Hub version to start playing with the new CLI.
PIP Install-U Huggingface_hub
Reload the terminal session. To successfully test the installation, run the HF version.
HF Version Huggingface_Hub Version: 0.34.0
Next, let’s investigate the new syntax for HF – Help:
hf-Help Usage: hf() Positional Arguments: {auth, cache, download, jobs, jobs, repo, repo-files, upload, upload-largefiles, env, version, lfs-enable-largefiles, lfs-multipart-upload} hf command helter (authentication, etc.). Cache Manages local cache directories. Download the Hub Jobs download file and manage your jobs in the hub. A repository manages the repository of a hub. Repo files are managed by repos in the hub. Upload a file or folder to the hub. Recommended for single commit uploads. Upload –large-folder uploads large folders to the hub. Recommended for resumable uploads. Print information about the env environment. Version Print information about the HF version. Options: -H, – Help Show this help message and exit
As you can see, commands are grouped by “resources” (HF AUTH, HF cache, HF repo, etc.). It also surfaces the HF upload, and HF downloads the root level. This is because it is expected to be the most commonly used command.
To dig deeper into the command group, simply add -Help.
HF Auth-HELP Usage: HF() AUTH(-H) {Login, Logout, whaAmi, Switch, List} …Positional Arguments: {login, logout, whoami, switch, list} Authentication Login Login Login Login Login Access Token List Switch List All Saved Access Token Options: -H, – Help Show this Help Message and Exit
🔀Transfer
If you’re used to Face-Cli hugs, most commands look familiar. The biggest changes affect authentication:
Huggingface-cliLoginHFAuthenticationLoginHuggingface-cli Oops
HF Authentication Oops
Huggingface-cli Log out
HF Authentication Log out
All authentication commands are grouped together with existing HF AUTH switches (toggle between different local profiles) and HF AUTH list (to list local profiles).
The Legacy Huggingface-Cli remains active and fully functional. We’re keeping it to make the transition easier. When you use the command from the legacy CLI, you will receive a warning pointing to the equivalent of the new CLI.
huggingface-cli Oops
⚠§Warning: ‘Huggingface-cli hoami’ Deprecated. use ‘Hf auth hoami’ Instead. Warplin organization: Hugging face, competition, HF internal test, template, HF test LAB, gradient theme, self-assessment, HuggingFacem4, HuggingFaceH4, open source metrics, SD Concepts-LIB rary, hf-doc-build, hf-accelerate, hfsmolcluster, open-llm-leaderboard, pbdeeplinks, discord-community, llhf, sllhf, mt-metrics, dduff, hf-inference, changelog, tiny-agent
Another… HF Job
We could not resist shipping the first dedicated command, HF Jobs.
Hugging Face Jobs is a new service that allows you to run scripts or Docker images that hug your Face Infrastructure using a hardware flavor of your choice. Billing is “pay-as-you-go”. This means paying only the seconds you use. Here’s how to invoke the first command:
HF work run – flavor = a10g-small ubuntu nvidia-smi
The CLI is heavily inspired by Docker’s familiar commands.
hf work –Help
Usage: HF Command>() work (-h) {Inspect, logs, ps, run, cancel, uv} …Locational argument: {{Inspect, logs, run, cancel, uv} huggingface.co work Inspect related commands for one or more jobs detailed information log jobs get logs in PS list job Cancel Job Cancel Job Cancel UV Script (Python with inline dependencies) HF Infrastructure Options: -H, – –Help Please show me this Help Message and Exit
Read our guide to learn more about Jobs.
Hugging face work is only available to professional users and teams or enterprise organizations. Upgrade your plan to get started!