Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

hf-cli

Skill by huggingface

Runs the Hugging Face Hub CLI (`hf`) to download, upload and manage models, datasets, spaces, buckets, repos, jobs and Inference Endpoints. Built for developers and ML teams who work on the Hugging Face Hub.

  • Score 91
  • 11k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install hf-cli

Built from the published package, never by AI.

git clone --depth 1 https://github.com/huggingface/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/hf-cli ~/.claude/skills/hf-cli

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install hf-cli in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

hf-cli is an agent skill that tells an AI assistant how to use the `hf` command line tool from Hugging Face. The source says `hf` replaces the deprecated `huggingface-cli`. The skill covers downloading and uploading files, authentication, the local cache, buckets, repos, discussions and pull requests, collections, datasets, papers, jobs, webhooks and Inference Endpoints. It is generated with huggingface_hub v2.4.0 and installs with a curl script.

The skill is aimed at developers, researchers and ML teams who work with the Hugging Face Hub. It also covers cloud storage needs such as training checkpoints, data pipelines and agent traces. The source says it should be used even when the user does not ask for a CLI command. Most commands accept a format option with auto, human, agent, json or quiet output.

Written from the project's SKILL.md and checked against it.

What it can do

  • hf downloadDownload files from the Hub with include and exclude filters, revisions and local directories.
  • hf uploadUpload a file or folder to the Hub, with commit messages and an option to create a pull request.
  • hf authLog in, log out, switch and list access tokens, and check which account is logged in.
  • hf bucketsCreate, list, sync, move, remove and delete buckets, and change their visibility.
  • hf cacheList, prune, remove and verify repositories stored in the local cache.
  • hf discussionsList, create, comment on, merge, close and reopen discussions and pull requests.
  • hf endpointsDeploy, list and delete Hugging Face Inference Endpoints, including from the Model Catalog.
  • hf datasetsList datasets, read dataset cards, list parquet files and run raw SQL queries with DuckDB.

What you need

  • A Hugging Face account and access token from huggingface.co/settings/tokens
  • curl to run the install script

Try asking

  • Download the config and weights for a model repo from the Hub
  • Create a private bucket and sync my training checkpoints to it
  • List open pull requests on my model repo and summarize them

Good to know

  • Deleting an Inference Endpoint is permanent, according to the source.
  • The command list is tied to huggingface_hub v2.4.0 and may change on regeneration.

Security check

C
  • Downloads a script from the internet and runs itIn skills/hf-cli/SKILL.md: curl -LsSf https://hf.co/cli/install.sh | bash

Checked automatically: skills/hf-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md33 KB

Alternatives to hf-cli

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

hf-cli: common questions

Does this replace huggingface-cli?

Yes. The source says the `hf` command replaces the deprecated `huggingface-cli` command.

Where are the authentication commands?

All auth commands now sit under `hf auth`, for example `hf auth whoami`.

Can it manage Hugging Face Buckets?

Yes. The source lists commands to create, list, sync, move, remove and delete buckets and to change their visibility.

How do I install hf-cli?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is hf-cli free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is hf-cli safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to hf-cli?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

hf-cli Install

Add to stack

Loading.