huggingface-hub

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

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill huggingface-hub-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-hub
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/mlops/huggingface-hub
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill huggingface-hub-chenhui-x

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. - Compute & Infrastructure: Deploy Inference Endpoints, run Jobs (including hf jobs uv for Python scripts), and manage Spaces with dev-mode and hot-reload. - Data & Automation: Query datasets with SQL via DuckDB, manage S3-like buckets, webhooks, collections, and local cache. - Use Case: You need to download a fine-tuned model, query a dataset's parquet files with SQL, and deploy an inference endpoint — all scriptable with hf download, hf datasets sql, and hf endpoints deploy using --format json for automation. ## Quick Start Ask the assistant to download a specific model from the Hugging Face Hub using the hf CLI, for example by requesting it to run hf download with a given repo ID.

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 Hub using the CLI?

Use hf download followed by the repository ID to fetch model files from the Hub. Authenticate first with the HF_TOKEN environment variable or the --token flag for gated or private repositories.

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. Install it with the official script: curl -LsSf https://hf.co/cli/install.sh | bash -s.

How do I run SQL queries on Hugging Face datasets?

Use hf datasets sql followed by your SQL statement to execute queries via DuckDB against dataset parquet URLs. You can list available parquet files first with hf datasets parquet.

Can I upload large folders to the Hugging Face Hub?

Yes, use hf upload with the repo ID and local path, which handles resumable uploads of large directories in a single commit. The older hf upload-large-folder command is deprecated in favor of hf upload.

How do I deploy an inference endpoint on Hugging Face?

Use the hf endpoints commands to deploy, pause, resume, or scale-to-zero Inference Endpoints, and browse available options with the catalog subcommand. Authentication via HF_TOKEN is required.

How do I get machine-readable output from the hf CLI?

Add the --format json global flag to any hf command to produce machine-readable output suitable for automation scripts. Use -q or --quiet to limit output to IDs only.