hf-cli

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

78|18|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/huggingface/context-course --skill hf-cli-huggingface
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-cli
Source: https://github.com/huggingface/context-course/tree/main/projects/pre-training/.agents/skills/hf-cli
Command: npx skills add https://github.com/huggingface/context-course --skill hf-cli-huggingface

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines managing Hugging Face Hub repositories, models, datasets, and Spaces via a single command-line interface.

Core Features & Use Cases

  • Centralized CLI to download, upload, and manage Hub assets across teams.
  • Built-in authentication and access controls for secure workflows.
  • Use Case: Automate repository synchronization in CI pipelines and local development.

Quick Start

Install the hf CLI using the official installer, then run hf --help to view available commands.

Frequently Asked Questions about hf-cli

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

FAQPage Schema
How do I download and upload Hugging Face Hub models from the command line?

You can download and upload Hugging Face Hub models, datasets, and Spaces by using the hf CLI. It provides a centralized command-line interface to synchronize Hub assets across local environments and CI pipelines.

What is the best way to automate Hugging Face repository synchronization in CI pipelines?

Automating Hugging Face repository synchronization in CI pipelines is achieved through the hf CLI. It supports core commands like download, upload, and repos to manage Hub content programmatically.

Do I need an authentication token to manage Hugging Face Spaces via the CLI?

Yes, you need a valid authentication token to manage Hugging Face Spaces via the CLI. The hf CLI includes built-in authentication and access controls to ensure secure workflows.

Can I manage Hugging Face datasets and models without using the web interface?

Yes, you can manage Hugging Face datasets and models entirely without the web interface by using the hf CLI. It allows you to list, download, and upload Hub assets directly from your local terminal.

What commands are available for listing Hugging Face Hub repositories locally?

The hf CLI provides specific commands for listing Hugging Face Hub repositories locally, alongside core commands for downloading, uploading, and managing models, datasets, and Spaces.

Does the hf CLI work for both local development and data team environments?

Yes, the hf CLI works for both local development and data team environments. It streamlines managing Hugging Face Hub assets across teams, supporting repository synchronization across various local environments.