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 openenv

Hugging Face Hub CLI (hf) for downloading, uploading and managing repos, models, datasets and Spaces. It replaces the deprecated huggingface-cli command.

  • Score 90
  • 2.9k stars
  • BSD-3-Clause
  • 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/openenv/OpenEnv /tmp/OpenEnv && mkdir -p ~/.claude/skills && cp -r /tmp/OpenEnv/.agents/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

The hf skill gives an AI assistant access to the Hugging Face Hub CLI. It documents the hf command set for downloading and uploading files, syncing with buckets, and managing repos, models, datasets and Spaces. The source says hf replaces the deprecated huggingface-cli command, and that auth commands now sit under hf auth, for example hf auth whoami.

The skill lists commands grouped by area, including hf jobs, hf endpoints, hf collections, hf discussions, hf papers and hf cache. Users install the CLI with a curl script and run hf --help to see the available functions. The file was generated with huggingface_hub v1.8.0 and can be regenerated with hf skills add --force. It suits anyone who manages Hub content from a terminal or through an AI assistant.

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, revision and local directory options.
  • hf uploadUpload a file or folder to the Hub, recommended for single-commit uploads.
  • hf upload-large-folderUpload a large folder to the Hub, recommended for resumable uploads.
  • hf authList, log in, log out, switch and check stored access tokens with whoami.
  • hf reposManage repos on the Hub, including creating and deleting branches.
  • hf jobsRun, inspect, log and schedule Jobs on Hugging Face infrastructure.
  • hf endpointsDeploy, pause, resume, scale and update Inference Endpoints.
  • hf collectionsCreate, list, update and edit items in collections on the Hub.
  • hf discussionsList, create, comment on, merge and close discussions and pull requests.
  • hf cacheList, prune, remove and verify entries in the local cache directory.

What you need

  • Hugging Face account with an access token from huggingface.co/settings/tokens
  • Bash shell to run the install script
  • Network access to hf.co for installation

Try asking

  • Download only the safetensors files from this Hugging Face model repo
  • Upload my local output folder to a private dataset repo on the Hub
  • List my Inference Endpoints and pause the idle ones

Good to know

  • The hf command replaces huggingface-cli, which is deprecated.
  • Auth commands are now all under hf auth.

Security check

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

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

Inside the skill

  • SKILL.md16 KB

Alternatives to hf-cli

All alternatives →

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

hf-cli: common questions

Does hf replace huggingface-cli?

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

How do I check which account hf is logged in as?

Run hf auth whoami. The source says it finds out which huggingface.co account you are logged in as.

Can hf upload large folders?

Yes. The source lists hf upload-large-folder as recommended for resumable uploads of a large folder to the Hub.

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 BSD-3-Clause licence. The service it connects to may have its own pricing.

Is hf-cli safe to use?

It scores 90 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.