huggingface-hub

Manages Hugging Face Hub models, datasets, and repositories via the hf CLI.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill huggingface-hub-avatar-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-hub
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/mlops/huggingface-hub
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill huggingface-hub-avatar-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interacting with the Hugging Face Hub through the web UI or raw API calls is slow and hard to automate. This Skill provides a complete reference for the modern hf command-line interface, replacing the deprecated huggingface-cli, so you can script and automate Hub operations directly from the terminal. ## Core Features & Use Cases - Model & Dataset Operations: Search, download, and upload models and datasets, including resumable uploads of large folders and SQL queries against dataset parquet files via DuckDB. - Repository & Collaboration Management: Create, move, duplicate, and delete repositories, manage branches and tags, and handle discussions and pull requests including diffs and merges. - Infrastructure & Automation: Deploy Inference Endpoints, run compute jobs, manage Spaces, S3-like buckets, webhooks, and local cache. - Use Case: A machine learning engineer needs to publish a fine-tuned model. They authenticate with hf auth login, create a repository with hf repos create, upload weights with hf upload-large-folder, and tag a release version, all from the command line. ## Quick Start Use the huggingface-hub skill to download the model meta-llama/Llama-3-8B from the Hugging Face Hub to my local machine.

Frequently Asked Questions about huggingface-hub

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download a model from Hugging Face using the CLI?

Use the command `hf download REPO_ID` with the repository identifier of the model. Authenticate first with `hf auth login` or by setting the HF_TOKEN environment variable if the repository is gated or private.

How to upload large folders to Hugging Face Hub?

Use `hf upload-large-folder REPO_ID LOCAL_PATH` for resumable uploads of large directories. For smaller single-commit uploads of files or folders, the standard `hf upload REPO_ID` command is recommended.

What is the difference between hf and huggingface-cli?

The `hf` command is the modern command-line interface for the Hugging Face Hub and replaces the deprecated `huggingface-cli` command. All new workflows should use `hf`, which covers repositories, datasets, jobs, endpoints, and more.

Can I run SQL queries on Hugging Face datasets?

Yes, use `hf datasets sql SQL` to execute raw SQL via DuckDB against dataset parquet URLs. You can list available parquet files for a dataset first with `hf datasets parquet`.

How do I manage multiple Hugging Face tokens on one machine?

Use `hf auth list` to view stored tokens and `hf auth switch` to toggle between them. You can also identify the active account at any time with `hf auth whoami`.

Does the hf CLI support machine-readable output for automation?

Yes, pass the global flag `--format json` to produce machine-readable output suitable for scripts and automation pipelines. The `-q` or `--quiet` flag limits output to IDs only.