huggingface-hub

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

Updated May 4, 2026
One-click install
npx skills add https://github.com/Junkfooooood/hermes-governance --skill huggingface-hub-junkfooooood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-hub
Source: https://github.com/Junkfooooood/hermes-governance/tree/main/skills/mlops/huggingface-hub
Command: npx skills add https://github.com/Junkfooooood/hermes-governance --skill huggingface-hub-junkfooooood

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, enabling scripted management of models, datasets, Spaces, and compute jobs. ## Core Features & Use Cases - Repository Operations: Download, upload, create, duplicate, move, and delete models, datasets, and Spaces, including resumable uploads of large folders. - Data & Discovery: List and inspect datasets and models, run DuckDB SQL queries against dataset parquet files, and browse daily papers. - Infrastructure & Automation: Deploy Inference Endpoints, run compute jobs, manage S3-like buckets, webhooks, collections, 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, and push weights using hf upload-large-folder for a resumable transfer. ## Quick Start Ask the assistant to download a specific model from the Hugging Face Hub, for example by saying: download the meta-llama/Llama-3-8B model using the hf CLI.

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 followed by the repository ID, such as hf download meta-llama/Llama-3-8B. 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 the Hugging Face Hub?

Use hf upload-large-folder with the repository ID and local path for resumable uploads of large directories. For smaller single-commit uploads, the standard hf upload command is recommended instead.

What is the difference between hf and huggingface-cli?

The hf command is the modern CLI 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, the hf datasets sql command executes raw SQL via DuckDB directly against dataset parquet URLs. You can also list parquet URLs for a dataset using hf datasets parquet.

How do I authenticate the Hugging Face CLI with multiple accounts?

The hf auth command group manages tokens: use login to add a token, list to see stored tokens, and switch to toggle between accounts. Tokens come from huggingface.co/settings/tokens, and whoami shows the active account.

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

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