---
title: "hf-cli skill: Hugging Face models, datasets and Hub jobs"
canonical_url: https://cookiesforai.app/skills/huggingface/hf-cli
last_updated: 2026-10-02T01:58:30+02:00
type: skill
summary: "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: "npx skills add huggingface/skills --skill hf-cli"
related:
  - "https://cookiesforai.app/skills/huggingface/huggingface-llm-trainer"
---

# 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.

| Fact | Value |
|---|---|
| Publisher | Hugging Face (official, own GitHub account) |
| Source | https://github.com/huggingface/skills/tree/HEAD/skills/hf-cli |
| License | Apache-2.0 |
| Repository stars | 11,120 on 2026-10-02 |
| Skill name | hf-cli |
| Category | Science and research |
| Skill last changed | 2026-10-01 |
| Page updated | 2026-10-02 |
| Facts checked | 2026-10-02 |

## Install

Install the skill with the skills CLI:

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

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

```
/plugin marketplace add huggingface/skills
```

Then install the hf-cli skill:

```
/plugin install hf-cli@huggingface/skills
```

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

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

## Ask your coding agent

A skill can include scripts that run on your computer, so read its source first: https://github.com/huggingface/skills/tree/HEAD/skills/hf-cli

```text
Install the agent skill hf-cli from github.com/huggingface/skills.
```

## What it 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 it

- 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 it 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 it works in

Hugging Face documents it 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 (listed with the CLI on 2026-10-01).

## License

Apache-2.0.

## Related

### Related skills for science and research

- [Hugging Face LLM trainer](https://cookiesforai.app/skills/huggingface/huggingface-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.

