Hugging Face Hub CLI
Drive the Hugging Face Hub from the terminal with the hf CLI. Download and upload models, datasets, and Spaces, create and manage repos, handle authentication, and clean up local cache.
This skill uses the Hugging Face hf CLI to automate Hub operations. It downloads models, datasets, and Spaces, uploads files and creates repositories, authenticates with tokens, inspects and prunes the local cache, and scripts repeatable Hub workflows for training and deployment pipelines.
When to use
Use when you need to pull or push models, datasets, or Spaces on the Hugging Face Hub, manage repos, or automate Hub tasks from the command line.
Examples
Download a model
Pull weights to local cache
Use the hf CLI to download a quantized Llama model and its tokenizer into a local folder
Push a fine-tuned model
Create a repo and upload
Create a new Hugging Face model repo and upload my fine-tuned checkpoint and model card with the hf CLI