HuggingFace CLI logo

HuggingFace CLI

Visit

The official hf-cli skill teaches coding agents every Hugging Face Hub `hf` command: downloads, uploads, repos, Spaces, Jobs, buckets and papers.

Share:
View alternatives

HuggingFace CLI on this page is the hf-cli skill from the official huggingface/skills repository. It gives a coding agent a complete, current reference for the hf command line tool, so the agent can search models, move files, manage repos and Spaces, and launch compute on the Hugging Face Hub without guessing flags. Hugging Face calls it the recommended first skill to install; the other skills in the repo build on it.

The skill file is generated from the locally installed CLI (the copy checked on 2026-09-23 was built from huggingface_hub v1.32.0), and hf skills add --force regenerates it after an upgrade. It states plainly that hf replaces the deprecated huggingface-cli command and that login now lives under hf auth.

Key Features

  • Transfers: hf download, hf upload, hf cp and hf sync, with --include/--exclude filters and a --dry-run option.
  • Repos and collaboration: hf repos create, hf discussions (open, diff, comment on and merge Hub pull requests) and hf collections.
  • Discovery: hf models list, hf datasets list, hf spaces search, hf papers search and hf papers read (a paper as markdown).
  • Data: hf datasets parquet lists shard URLs and hf datasets sql runs DuckDB SQL against them.
  • Compute: hf jobs run, hf jobs uv run, hf endpoints deploy for Inference Endpoints, and the experimental hf sandbox VMs.
  • Storage and cache: hf buckets, hf cache list, hf cache prune and hf cache verify.
  • Agent output: most commands accept --format agent or --format json, which is easier for an agent to parse than tables.

Use Cases

  • Letting an agent fetch a model or dataset into a project without you looking up flags.
  • Reviewing and merging a Hub pull request from the terminal.
  • Querying a dataset with SQL before deciding whether to download it.

Pricing

The skill and the CLI are free and open source (the repository is Apache-2.0). Commands that start paid compute, such as Jobs, sandboxes and Inference Endpoints, bill your Hugging Face account.

Getting Started

  1. Install the CLI: curl -LsSf https://hf.co/cli/install.sh | bash -s, then hf auth login (or set HF_TOKEN).
  2. In Claude Code: /plugin marketplace add huggingface/skills, then /plugin install hf-cli@huggingface/skills.
  3. The same skill ships in the Cursor Marketplace and the Codex Plugins Directory; Gemini CLI can install the repo as an extension.
  4. Add workflow skills later with hf skills add <skill-name>.

Limitation: the skill is long (about 3,800 words), so it costs context on every activation, and it can lag a newer CLI until you regenerate it. Destructive commands such as hf buckets delete still deserve a human check.

FAQ

Is huggingface-cli still supported?

It is deprecated. The skill and the CLI docs both point to hf.

Do I need the other Hugging Face skills?

No. Start with this one and add trainers or evaluators only when you need their workflows.

Alternatives

Conclusion

Install hf-cli first if your agent touches the Hub. It replaces guesswork about flags with the real command list. See more in the skills hub and the hugging-face tag.

Comments

No comments yet. Be the first to comment!