huggingface-hub

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

5|2|Updated May 26, 2026
One-click install
npx skills add https://github.com/perasyudha/Nyxora --skill huggingface-hub-perasyudha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-hub
Source: https://github.com/perasyudha/Nyxora/tree/main/packages/core/playbooks/mlops/huggingface-hub
Command: npx skills add https://github.com/perasyudha/Nyxora --skill huggingface-hub-perasyudha

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 & Compute Workflows: Run SQL queries against dataset parquet files with DuckDB, deploy Inference Endpoints, and execute Python jobs on Hugging Face infrastructure. - Collaboration & Automation: Manage discussions, pull requests, webhooks, collections, and S3-like buckets, with JSON output flags for scripting. - Use Case: A machine learning engineer needs to publish a fine-tuned model and sync a large training dataset. Use this Skill to authenticate with a token, upload the model in a single commit, and run hf upload-large-folder for the dataset. ## Quick Start Ask the AI 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 repository 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 the hf download command followed by the repository ID, such as hf download org/model-name. Authenticate first with hf auth login or by setting the HF_TOKEN environment variable for gated or private repositories.

How to upload large folders to 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.

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, jobs, endpoints, buckets, and webhooks.

Can I run SQL queries on Hugging Face datasets?

Yes, the hf datasets sql command executes raw SQL via DuckDB against dataset parquet URLs. You can also list parquet URLs with hf datasets parquet before querying.

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

Use hf auth login with tokens from huggingface.co/settings/tokens, then manage multiple stored tokens with hf auth list and hf auth switch. The hf auth whoami command shows the currently active account.

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

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