hf-cli

Manages Hugging Face Hub models, datasets, spaces, repos, jobs, and endpoints via the hf CLI.

Updated May 29, 2026
One-click install
npx skills add https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset --skill hf-cli-ratnaatika
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-cli
Source: https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset/tree/main/.agents/skills/hf-cli
Command: npx skills add https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset --skill hf-cli-ratnaatika

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with the Hugging Face Hub from the command line involves many distinct operations—downloading models, uploading datasets, managing repos, running jobs, and configuring spaces—and the deprecated huggingface-cli no longer reflects the current command structure. This Skill provides the complete, up-to-date hf CLI command reference so an AI assistant can perform any Hub operation correctly. ## Core Features & Use Cases - Hub Resource Management: Download, upload, copy, and sync models, datasets, spaces, and buckets, including large-folder resumable uploads and local cache management. - Compute & Deployment: Run and schedule jobs on Hugging Face infrastructure, deploy and manage Inference Endpoints, and configure Space hardware, secrets, and variables. - Collaboration & Discovery: Manage repos, branches, tags, discussions, pull requests, collections, webhooks, and search or read models, datasets, and academic papers. - Use Case: A user asks to upload a trained checkpoint folder to a private model repo and then deploy it as an Inference Endpoint; the assistant uses hf upload-large-folder followed by hf endpoints deploy with the correct flags. ## Quick Start Ask the assistant to download a specific model from the Hugging Face Hub or list your repos, and it will run the appropriate hf command with the right options.

Frequently Asked Questions about hf-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download a model from the Hugging Face Hub using the CLI?

Use `hf download REPO_ID` with optional flags like `--revision`, `--include`, `--exclude`, and `--local-dir` to control what is fetched and where it is stored. The `hf` command replaces the deprecated `huggingface-cli`.

How do I upload a large folder to the Hugging Face Hub?

Use `hf upload-large-folder REPO_ID LOCAL_PATH`, which is recommended for resumable uploads of large directories. For single-commit uploads of smaller content, use `hf upload REPO_ID` instead.

How do I authenticate the hf CLI with my Hugging Face account?

Set the HF_TOKEN environment variable, which is the recommended approach, or run `hf auth login` with a token from huggingface.co/settings/tokens. Verify the active account with `hf auth whoami`.

Can I run training jobs on Hugging Face infrastructure from the CLI?

Yes, `hf jobs run IMAGE COMMAND` runs a job on HF infrastructure with selectable hardware flavors from cpu-basic up to h200x8. You can also schedule recurring jobs with `hf jobs scheduled run` and monitor them via `hf jobs logs` and `hf jobs ps`.

What is the difference between hf and huggingface-cli?

The `hf` command is the current Hugging Face Hub CLI and fully replaces the deprecated `huggingface-cli`. Auth commands now live under `hf auth`, for example `hf auth whoami`.

How do I deploy a model as a Hugging Face Inference Endpoint?

Use `hf endpoints deploy NAME --repo TEXT --framework TEXT --accelerator TEXT --instance-size TEXT --instance-type TEXT --region TEXT --vendor TEXT`, or deploy from the catalog with `hf endpoints catalog deploy`. Manage lifecycle with pause, resume, scale-to-zero, update, and delete subcommands.