huggingface-hub

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

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill huggingface-hub-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-hub
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/skills/mlops/huggingface-hub
Command: npx skills add https://github.com/xu1713/openhorse --skill huggingface-hub-xu1713

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 CLI so you can search, download, upload, and manage models, datasets, Spaces, and compute jobs directly from the command line. ## Core Features & Use Cases - Repository Operations: Download and upload models and datasets, create or delete repos, manage branches, tags, and discussions/PRs. - Data & Compute: Run SQL queries against dataset parquet files with DuckDB, deploy Inference Endpoints, and launch compute Jobs on HF infrastructure. - Storage & Automation: Manage S3-like buckets, local caches, webhooks, and collections for automated MLOps workflows. - Use Case: Download a fine-tuned model with hf download, query a dataset with hf datasets sql, then upload results back to the Hub in a single commit. ## Quick Start Use the hf CLI to download the model meta-llama/Llama-3-8B from the Hugging Face Hub and show me the environment details.

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 `hf download REPO_ID` to download files from the Hub. Authenticate first with `hf auth login` or by setting the HF_TOKEN environment variable, especially for gated or private repositories.

What is the difference between hf and huggingface-cli?

The `hf` command is the modern CLI that replaces the deprecated `huggingface-cli` command. All new workflows should use `hf`, which covers downloads, uploads, repos, jobs, endpoints, and more.

How do I upload a large folder to the 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, use `hf upload REPO_ID` instead.

Can I run SQL queries on Hugging Face datasets?

Yes, `hf datasets sql SQL` executes raw SQL via DuckDB against dataset parquet URLs. You can list available parquet files first with `hf datasets parquet`.

How do I authenticate the hf CLI with multiple accounts?

Use `hf auth login` with tokens from huggingface.co/settings/tokens. Manage multiple stored tokens with `hf auth list` and switch between them using `hf auth switch`.

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

Yes, pass the global `--format json` flag to produce machine-readable output for scripting. The `-q` or `--quiet` flag limits output to IDs only, which is useful in pipelines.