Hugging Face CLI Skill · Data Ai

Hugging Face CLI: The Ultimate Hub Management Tool

Master the hf command to manage 100s of models and datasets.

Streamline your AI workflow with the new Hugging Face Hub CLI tool.

  • Hugging Face Hub
  • CLI Tool
  • Model Management
  • Dataset Sync
  • AI Workflow

About This Skill

Streamline your AI workflows using the hf command. This tool provides 5+ essential command categories including download, env, sync, upload, and version management for seamless Hub interaction.

Quick Start

  1. 1Download the installer script
  2. 2Review the local script content
  3. 3Execute the bash installer
Example Command
curl -LsSf https://hf.co/cli/install.sh -o /tmp/hf-install.sh && bash /tmp/hf-install.sh

Core Capabilities

Commands

Execute powerful operations like hf download, hf sync, and hf upload to manage your repositories.

Usage Examples

Input

hf download bert-base-uncased

Output

Files downloaded from the Hub to local cache.

Input

hf upload my-dataset ./data

Output

Dataset folder uploaded to the Hub repository.

Before

Local files and remote bucket are out of sync.

After

Local directory and remote bucket are perfectly mirrored.

SKILL.md

---
source: "https://github.com/huggingface/skills/tree/main/skills/hf-cli"
name: hugging-face-cli
description: "Use the Hugging Face Hub CLI (`hf`) to download, upload, and manage models, datasets, and Spaces."
risk: unknown
---

Install by downloading the installer script first, reviewing it, and then running it locally. Example:
`curl -LsSf https://hf.co/cli/install.sh -o /tmp/hf-install.sh && less /tmp/hf-install.sh && bash /tmp/hf-install.sh`

## When to Use
Use this skill when you need the `hf` CLI for Hub authentication, downloads, uploads, repo management, or basic compute operations.

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.8.0`. 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 --quiet --max-workers INTEGER]`
- `hf env` — Print information about the environment.
- `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 --quiet]`
- `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 --quiet]`
- `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]`
- `hf version` — Print information about the

Frequently Asked Questions

FAQ

Is this compatible with the old huggingface-cli?
Yes, the hf command is the modern replacement for the deprecated huggingface-cli command.
Who is the target audience for this tool?
It is designed for AI developers, data scientists, and ML engineers managing Hub assets.
How does it differ from using the Web UI?
The CLI allows for automation, bulk downloads, and large folder uploads that are difficult via the browser.
Does it support authentication?
Yes, all authentication commands are now centralized under the 'hf auth' subcommand.
What are the expected results of using hf sync?
You can expect a precise synchronization of files between a local directory and a remote bucket.

Discussion

Discussion

0 comments
U

Trigger Phrases

Use these phrases to activate this skill in your AI coding assistant:

hf downloadhf uploadhf synchf authhf env