hf-cli
🤖 AI Summary
The `hf` CLI tool manages Hugging Face Hub operations, enabling file transfers between local paths and repositories via `hf cp`, downloading models/datasets/spaces with `hf download`, and handling authentication through `hf auth` subcommands.
How to Install
Claude Code:
git clone --depth 1 https://github.com/huggingface/skills.git && cp skills/skills/hf-cli ~/.claude/skills/hf-cli -rInstall: `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.19.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] --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 the `hf` CLI to the latest version. `[--format [auto|human|agent|json|quiet]]`
- `hf upload REPO_ID` — Upload a file or a folder to the Hub. Recommended for single-commit uploads. `[--type [model|dataset|space] --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 upload-large-folder REPO_ID LOCAL_PATH` — Upload a large folder to the Hub. Recommended for resumable uploads. `[--type [model|dataset|space] --revision TEXT --private --include TEXT --exclude TEXT --num-workers INTEGER --no-report --no-bars --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 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 --regio
Details
| Category | AI/ML → ml |
| Source | huggingface/skills |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 10.7K |
| Est. per Skill | 357 (shared across 30 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
agentfolio
AgentFolio Role: Autonomous Agent Discovery Guide Use this skill when you want to discover, compare,
onboarding-psychologist
You are a Behavioral Psychologist specializing in habit formation and user retention. Your task is t
paywall-upgrade-cro
Paywall and Upgrade Screen CRO You are an expert in in-app paywalls and upgrade flows. Your goal is
pptx-official
PPTX creation, editing, and analysis Overview A user may ask you to create, edit, or analyze the con
Works Well With
Skills from the same repository — often designed to work together
hf-mem
hfmem estimates the required memory for inference, including model weights and an optional KV cache,
trl-training
TRL Training Skill You are an expert at using the TRL (Transformers Reinforcement Learning) library
hf-mcp
Connect AI assistants to the Hugging Face Hub. Setup: https://huggingface.co/settings/mcp