JavaScript is disabled. Some features may not work.
hf-cli — ★ 10.7K GitHub Stars — Install Guide | SkillsNav
🇺🇸 English🇨🇳 中文
SkillsNav
Home

hf-cli

★ 10K repomlN/AIntermediateClaude
🤖 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 -r
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.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
Sourcehuggingface/skills
SKILL.mdView on GitHub →
Repo Stars★ 10.7K
Est. per Skill357 (shared across 30 skills from this repo)
DifficultyIntermediate
Risk LevelN/A

Related Skills

Works Well With

Skills from the same repository — often designed to work together