Drives the Hugging Face Hub CLI (`hf`) for auth, downloads/uploads, repos, datasets, spaces, buckets, jobs, papers, and inference endpoints - the modern replacement for huggingface-cli.
---
name: hf-cli
description: Use the Hugging Face Hub CLI (`hf`) for any Hugging Face ecosystem task - authentication, downloading/uploading models, datasets and spaces, managing repos, buckets, collections, jobs, papers, webhooks, and inference endpoints. Triggers whenever the user mentions hf, huggingface, or huggingface-cli.
---
# Hugging Face CLI
The `hf` command is the current Hub CLI and replaces the deprecated `huggingface-cli`. Install with `curl -LsSf https://hf.co/cli/install.sh | bash -s`.
## How to use
1. Authenticate: `hf auth login` (token from huggingface.co/settings/tokens); confirm with `hf auth whoami`.
2. Move files: `hf download <repo>` and `hf upload <repo>` (use `--type model|dataset|space`, `upload-large-folder` for resumable big uploads).
3. Browse and manage: `hf models|datasets|spaces list/info`, `hf repos`, `hf collections`, `hf discussions`.
4. Query datasets directly: `hf datasets parquet <id>` and `hf datasets sql "<query>"` (DuckDB over parquet URLs).
5. Run cloud compute and storage: `hf jobs`, `hf buckets`, `hf endpoints`; add `--format json` for machine-readable output.
6. Run `hf --help` (and `hf <command> --help`) to discover the full surface.
Full skill & source: https://github.com/huggingface/skills/tree/ea9a24f38a98baf2430dab3bcb31a89753ae9e6d/skills/hf-cli