hf-cli

Hugging Face CLI

hf-cli is Hugging Face's agent skill for its hf command-line tool: it lets an agent download and upload models and datasets, manage repos, Spaces and buckets, read papers and run jobs on the Hub.

Install Hugging Face CLI

Install the skill with the skills CLI

Terminal
npx skills add huggingface/skills --skill hf-cli

Or, in Claude Code, add Hugging Face's plugin marketplace

Terminal
/plugin marketplace add huggingface/skills

Then install the hf-cli skill

Terminal
/plugin install hf-cli@huggingface/skills

Or, in Gemini CLI, install Hugging Face's extension

Terminal
gemini extensions install https://github.com/huggingface/skills.git --consent

Or paste this into your coding agent: Install the agent skill hf-cli from github.com/huggingface/skills. A skill can include scripts that run on your computer, so read its source first.

What Hugging Face CLI does

Hugging Face CLI is the skill Hugging Face recommends installing first. It is generated from the hf tool itself, version 2.1.1 of huggingface_hub on 2026-10-01, and lists every hf command with its flags so the agent can work with the Hugging Face Hub without guessing. It also tells the agent that hf replaces the deprecated huggingface-cli command.

The command list covers downloading and uploading files, copying and syncing between local folders, repos and buckets, logging in and switching tokens, the local cache, collections, dataset queries, discussions and pull requests on Hub repos, Inference Endpoints, Spaces settings, webhooks and paper search. It also covers hf jobs for running scripts on Hugging Face hardware and an experimental sandbox command.

A short section explains hf-mount, a separate tool that mounts a Hub repo or bucket as a local folder and fetches files on demand. Tips at the end tell the agent to read each command's help, authenticate with the HF_TOKEN environment variable, and update the CLI with hf update.

When to use Hugging Face CLI

  • You want an agent to download a model or dataset from the Hugging Face Hub.
  • You want trained weights or results uploaded to a Hub repo.
  • You need a Space's hardware, secrets or variables changed from the terminal.
  • You want to search Hugging Face papers or browse models for a task.

When to pick something else

  • Writing training code: Hugging Face has separate skills such as huggingface-llm-trainer for that.

What Hugging Face CLI needs

  • The hf CLI (curl -LsSf https://hf.co/cli/install.sh | bash -s)
  • A Hugging Face account and token for private repos, uploads and jobs

Which agents Hugging Face CLI works in

Hugging Face documents Hugging Face CLI for Claude Code, Codex, Gemini CLI, Cursor, Any agent that reads SKILL.md files, through the skills CLI. The open skills CLI also installs it into 78 agents, including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode (we listed it with the CLI on October 1, 2026). See where each agent looks for skills.

Hugging Face CLI license

Hugging Face CLI is published under Apache-2.0.

  • Hugging Face LLM trainer: huggingface-llm-trainer is Hugging Face's agent skill for fine-tuning language and vision models on its cloud GPUs, using TRL or Unsloth on Hugging Face Jobs, with no local GPU needed. (11,120 repository stars on October 2, 2026)

Lists that include hf-cli