hf-cli
HF CLI tool for Hub operations
Developer Setup
Setup & Installation
npx skills add https://github.com/huggingface/skills --skill hf-clinpx skills add https://github.com/huggingface/skills --skill hf-cliOverview
What This Skill Does
The `hf` CLI manages Hugging Face Hub repositories, models, datasets, and Spaces from the terminal. It handles downloads, uploads, cache, inference endpoints, jobs, and webhooks. It replaces the deprecated `huggingface-cli` command.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
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 v1.16.1. Run hf skills add --force to regenerate.
Commands
hf download REPO_ID— Download files from the Hub.[--type CHOICE --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --max-workers INTEGER --format CHOICE]hf env— Print information about the environment.[--format CHOICE]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 CHOICE]hf update— Update thehfCLI to the latest version.[--format CHOICE]hf upload REPO_ID— Upload a file or a folder to the Hub. Recommended for single-commit uploads.[--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --format CHOICE]hf upload-large-folder REPO_ID LOCAL_PATH— Upload a large folder to the Hub. Recommended for resumable uploads.[--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --num-workers INTEGER --no-report --no-bars --format CHOICE]hf version— Print information about the hf version.[--format CHOICE]
hf auth — Manage authentication (login, logout, etc.).
hf auth list— List all stored access tokens.[--format CHOICE]hf auth login— Login using a token from huggingface.co/settings/tokens.[--add-to-git-credential --force --format CHOICE]hf auth logout— Logout from a specific token.[--token-name TEXT --format CHOICE]hf auth switch— Switch between access tokens.[--token-name TEXT --add-to-git-credential --format CHOICE]hf auth token— Print the current access token to stdout.[--format CHOICE]
Recommendations
Explore other random skills
benchmark
Performance Engineer: baseline page load times, Core Web Vitals, and resource sizes
document-release
Technical Writer: update all project docs to match what you just shipped
retro
Eng Manager weekly retro with per-person breakdowns and shipping streaks