hf-cli
What it does
This skill lets the AI use the hf command line tool to work with the Hugging Face Hub. It is for people who download or share AI models, datasets and demos and want their agent to handle the steps.
When to use it
- βWhen you want to download a model, dataset or Space from the Hugging Face Hub.
- βWhen you want to upload files or a folder to a Hub repository.
- βWhen you need to manage the local cache, sign in or check your Hub account.
Skill link
https://github.com/huggingface/skills/blob/main/skills/hf-cli/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βDownload the model files for this Hugging Face repo into my folder, and show me my account name to confirm I am signed in.β
5 new skills a week. 1 minute to read.
How it works
The AI runs the hf command line tool, which handles sign-in, downloads, uploads and cache management. It reads the tool's built-in help to choose the right command for each task.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Install: curl -LsSf https://hf.co/cli/install.sh | bash -s.
The Hugging Face Hub CLI tool hf is available. IMPORTANT: The hf command replaces the deprecated huggingface-cli command.
Use hf --help to view available functions. Note that auth commands are now all under hf auth e.g. hf auth whoami.
Generated with huggingface_hub v2.4.0. Run hf skills add --force to regenerate.
Commands
hf cp SRCβ Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf download REPO_IDβ Download files from the Hub.[--type [model|dataset|space|kernel] --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --max-workers INTEGER --format [auto|human|agent|json|quiet]]hf envβ Print information about the environment.[--format [auto|human|agent|json|quiet]]hf syncβ Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]hf updateβ Update thehfCLI to the latest version.[--format [auto|human|agent|json|quiet]]hf upload REPO_IDβ Upload a file or a folder to the Hub.[--type [model|dataset|space|kernel] --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --format [auto|human|agent|json|quiet]]hf versionβ Print information about the hf version.[--format [auto|human|agent|json|quiet]]
hf auth β Manage authentication (login, logout, etc.).
hf auth listβ List all stored access tokens.[--format [auto|human|agent|json|quiet]]hf auth loginβ Login from your browser, or using a token from huggingface.co/settings/tokens.[--add-to-git-credential --force --format [auto|human|agent|json|quiet]]hf auth logoutβ Logout from a specific token.[--token-name TEXT --format [auto|human|agent|json|quiet]]hf auth switchβ Switch between access tokens.[--token-name TEXT --add-to-git-credential --format [auto|human|agent|json|quiet]]hf auth tokenβ Print the current access token to stdout.[--format [auto|human|agent|json|quiet]]hf auth whoamiβ Find out which huggingface.co account you are logged in as.[--format [auto|human|agent|json|quiet]]
hf buckets β Commands to interact with buckets.
hf buckets cp SRCβ Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf buckets create BUCKET_IDβ Create a new bucket.[--private --region [us|eu] --exist-ok --format [auto|human|agent|json|quiet]]hf buckets delete BUCKET_IDβ Delete a bucket.[--yes --missing-ok --format [auto|human|agent|json|quiet]]hf buckets info BUCKET_IDβ Get info about a bucket.[--format [auto|human|agent|json|quiet]]hf buckets listβ List buckets or files in a bucket.[--human-readable --tree --recursive --search TEXT --format [auto|human|agent|json|quiet]]hf buckets move FROM_ID TO_IDβ Move (rename) a bucket to a new name or namespace.[--format [auto|human|agent|json|quiet]]hf buckets remove ARGUMENTβ Remove files from a bucket.[--recursive --yes --dry-run --include TEXT --exclude TEXT --format [auto|human|agent|json|quiet]]hf buckets settings BUCKET_IDβ Update bucket settings (visibility).[--private --public --format [auto|human|agent|json|quiet]]hf buckets syncβ Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]
hf cache β Manage local cache directory.
hf cache listβ List cached repositories or revisions.[--cache-dir TEXT --revisions --filter TEXT --sort [accessed|accessed:asc|accessed:desc|modified|modified:asc|modified:desc|name|name:asc|name:desc|size|size:asc|size:desc] --limit INTEGER --show-warnings --format [auto|human|agent|json|quiet]]hf cache pruneβ Remove detached revisions and incomplete downloads from the cache.[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet]]hf cache rm TARGETSβ Remove cached repositories, revisions or files. `[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet
FAQ
Does it replace the old huggingface-cli command?
Yes. The hf command replaces the deprecated huggingface-cli command.
How do I check that I am signed in?
Authentication commands are grouped under hf auth, such as hf auth whoami to show your account.
Can it run jobs on Hugging Face?
Yes. It can run and schedule jobs on Hugging Face infrastructure, along with managing buckets and repos.
Details
Original description by the author
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastructure; managing Hugging Face repos; discussions and pull requests; browsing models, datasets and spaces; reading, searching, or browsing academic papers; managing collections; querying datasets; configuring spaces; setting up webhooks; or deploying and managing HF Inference Endpoints. Make sure to us
repo: huggingface/skills
Popularity
- GitHub stars
- 11k
- Ranking position
- #11765
- License
- Apache-2.0
- Updated
- 10/30/2026
Comments
- β¦
More skills from this repository
hf-cloud-aws-context-discovery
11kHelps your agent find your AWS profile, region and account details before any cloud work, so it does not guess which account to use.
hf-cloud-python-env-setup
11kHelps your agent set up a clean Python environment with a suitable Python version and current libraries before running SageMaker or AWS automation.
hf-cloud-sagemaker-deployment-planner
11kHelps your agent plan how to deploy a model to Amazon SageMaker, choosing real-time, serverless, async or batch hosting with sensible defaults.
hf-cloud-sagemaker-iam-preflight
11kHelps your agent confirm a usable SageMaker execution role exists before deploying, instead of creating new permissions in your AWS account without checking.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.