hf-cli

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

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Solizardking/.agents --skill hf-cli-solizardking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-cli
Source: https://github.com/Solizardking/.agents/tree/main/skills/hf-cli
Command: npx skills add https://github.com/Solizardking/.agents --skill hf-cli-solizardking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with the Hugging Face Hub through a browser or raw API calls is slow and hard to automate. This Skill gives an AI assistant full command-line control over the Hub so you can download models, upload datasets, run jobs, and manage repos with simple requests. ## Core Features & Use Cases - Hub Resource Management: Download, upload, search, and inspect models, datasets, and spaces, 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 & Storage: Manage repos, branches, tags, discussions, pull requests, collections, webhooks, and cloud buckets for checkpoints and data pipelines. - Use Case: Ask the assistant to download a specific model revision, query a dataset with SQL over its parquet files, then schedule a training job on an A100 GPU — all without leaving the conversation. ## Quick Start Ask the assistant to download the model 'openai-community/gpt2' from the Hugging Face Hub and show information about it.

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 gets fetched and where. The hf command replaces the deprecated huggingface-cli download command.

How to authenticate with the Hugging Face CLI?

Run 'hf auth login' and paste a token from huggingface.co/settings/tokens, or set the HF_TOKEN environment variable, which is the recommended approach. Use 'hf auth whoami' to verify the active account and 'hf auth switch' to change tokens.

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 moved under 'hf auth', and new features like buckets, jobs, and endpoints are only available in hf.

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

Yes, 'hf jobs run IMAGE COMMAND' executes jobs on HF infrastructure with selectable hardware flavors from cpu-basic up to h200x8 GPUs. You can also schedule recurring jobs with 'hf jobs scheduled run' and monitor logs with 'hf jobs logs'.

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

Use 'hf upload-large-folder REPO_ID LOCAL_PATH' for resumable uploads of large directories. For smaller single-commit uploads, 'hf upload REPO_ID' is the recommended command.

Does the hf CLI support querying datasets with SQL?

Yes, 'hf datasets sql SQL' runs raw DuckDB SQL queries directly against a dataset's parquet URLs on the Hub. Use 'hf datasets parquet DATASET_ID' first to list the available parquet file URLs.