huggingface-hub

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interacting with the Hugging Face Hub through the web UI is slow and hard to automate. This Skill provides a complete reference for the modern hf command-line interface, enabling scripted searching, downloading, uploading, and management of models, datasets, and Spaces. ## Core Features & Use Cases - Repository Operations: Download and upload models and datasets, create or delete repos, and manage branches, tags, and files from the terminal. - Hub Management: Handle authentication tokens, discussions and pull requests, collections, webhooks, and local cache pruning. - Compute & Infrastructure: Deploy Inference Endpoints, run Jobs on HF infrastructure, and manage Spaces with dev-mode and hot-reload. - Use Case: A machine learning engineer needs to download a fine-tuned model, query a dataset with SQL via DuckDB, and upload results to a new repository — all automated in a single shell workflow using hf download, hf datasets sql, and hf upload. ## Quick Start Use the huggingface-hub skill to download the model 'meta-llama/Llama-3-8B' from the Hugging Face Hub using my HF_TOKEN.

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 the HF_TOKEN environment variable or the `--token` flag, and add `--format json` for machine-readable output in automation scripts.

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, `hf upload REPO_ID` is the recommended command.

Is huggingface-cli deprecated and what replaces it?▼

Yes, `huggingface-cli` is deprecated and replaced by the modern `hf` command. Install it with `curl -LsSf https://hf.co/cli/install.sh | bash -s` and run `hf --help` to see all available functions.

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 also list parquet URLs directly with `hf datasets parquet` and inspect datasets using `hf datasets list` and `info`.

How do I manage multiple Hugging Face access tokens?▼

Use the `hf auth` command group: `login` and `logout` manage sessions, `list` and `switch` toggle between multiple stored tokens, and `whoami` identifies the currently logged-in account.

Does the hf CLI work on Windows, Linux, and macOS?▼

Yes, the hf CLI supports Linux, macOS, and Windows platforms. Install it using the official install script from hf.co, then verify your setup with `hf env` or `hf version`.