hf-cli

Operate the Hugging Face Hub CLI for authentication, repositories, jobs, endpoints, and spaces.

507|40|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/waybarrios/opencode-power-pack --skill hf-cli-waybarrios
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hf-cli
Source: https://github.com/waybarrios/opencode-power-pack/tree/main/skills/hf-cli
Command: npx skills add https://github.com/waybarrios/opencode-power-pack --skill hf-cli-waybarrios

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Hugging Face Hub resources from the terminal requires knowing dozens of commands across authentication, repositories, datasets, jobs, endpoints, and spaces. This Skill gives an AI assistant the complete, current command reference for the hf CLI so it can execute Hub operations correctly on the first attempt. ## Core Features & Use Cases - Repository and file operations: Download, upload, copy, sync, and manage models, datasets, spaces, and buckets, including branch, tag, and settings administration. - Compute and deployment management: Run and schedule Jobs, deploy and scale Inference Endpoints, manage Space hardware, secrets, and logs, and create sandboxes. - Hub discovery and collaboration: Search models, datasets, papers, and spaces, manage collections, discussions, pull requests, and webhooks. - Use Case: Ask the assistant to download a gated model revision, create a private dataset repo, upload a folder, and then schedule a GPU job to process it, all via the correct hf commands. ## Quick Start Use the hf-cli skill to log in to Hugging Face and download the model openai-community/gpt2 into a local directory.

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 Hugging Face using the CLI?▼

Use hf download with the repository ID, for example hf download openai-community/gpt2. Options like --revision, --include, --exclude, and --local-dir control which files are fetched and where they are stored.

How do I authenticate the Hugging Face CLI?▼

Run hf auth login to authenticate from your browser or with a token from huggingface.co/settings/tokens. You can also set the HF_TOKEN environment variable, which is the recommended approach for scripts and CI.

What is the difference between hf and huggingface-cli?▼

The hf command replaces the deprecated huggingface-cli command. Authentication commands moved under hf auth, so hf auth whoami replaces the old huggingface-cli whoami.

Can the hf CLI run jobs on Hugging Face infrastructure?▼

Yes, hf jobs run executes a container image command on Hugging Face hardware, with flavors from cpu-basic up to h200x8 GPUs. You can also schedule recurring jobs, stream logs, and run UV scripts with hf jobs uv run.

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

Use hf upload REPO_ID LOCAL_PATH, which is the recommended single-commit upload command. The older hf upload-large-folder command is deprecated in favor of hf upload.

When should I not use the hf-cli skill?▼

This skill covers CLI operations only, not model recommendations, paper analysis, training design, or building a Space. For those tasks, use skills or tools focused on ML research and application development instead.