hf-cli
Ce qu’il fait
Cette compétence permet à l'IA d'utiliser l'outil en ligne de commande hf pour travailler avec le Hub Hugging Face. Elle s'adresse aux personnes qui téléchargent ou partagent des modèles d'IA, des jeux de données et des démonstrations, et veulent que leur agent gère les étapes.
Quand l’utiliser
- ✓Quand vous voulez télécharger un modèle, un jeu de données ou un Space depuis le Hub Hugging Face.
- ✓Quand vous voulez téléverser des fichiers ou un dossier dans un dépôt du Hub.
- ✓Quand vous devez gérer le cache local, vous connecter ou vérifier votre compte du Hub.
Lien du skill
https://github.com/huggingface/skills/blob/main/skills/hf-cli/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Télécharge les fichiers du modèle de ce dépôt Hugging Face dans mon dossier, et affiche mon nom de compte pour confirmer que je suis connecté.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'IA lance l'outil en ligne de commande hf, qui gère la connexion, les téléchargements, les téléversements et la gestion du cache. Elle lit l'aide intégrée de l'outil pour choisir la bonne commande pour chaque tâche.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Install: curl -LsSf https://hf.co/cli/install.sh | bash -s.
The Hugging Face Hub CLI tool hf is available. IMPORTANT: The hf command replaces the deprecated huggingface-cli command.
Use hf --help to view available functions. Note that auth commands are now all under hf auth e.g. hf auth whoami.
Generated with huggingface_hub v2.4.0. Run hf skills add --force to regenerate.
Commands
hf cp SRC— Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf download REPO_ID— Download files from the Hub.[--type [model|dataset|space|kernel] --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --max-workers INTEGER --format [auto|human|agent|json|quiet]]hf env— Print information about the environment.[--format [auto|human|agent|json|quiet]]hf sync— Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]hf update— Update thehfCLI to the latest version.[--format [auto|human|agent|json|quiet]]hf upload REPO_ID— Upload a file or a folder to the Hub.[--type [model|dataset|space|kernel] --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --format [auto|human|agent|json|quiet]]hf version— Print information about the hf version.[--format [auto|human|agent|json|quiet]]
hf auth — Manage authentication (login, logout, etc.).
hf auth list— List all stored access tokens.[--format [auto|human|agent|json|quiet]]hf auth login— Login from your browser, or using a token from huggingface.co/settings/tokens.[--add-to-git-credential --force --format [auto|human|agent|json|quiet]]hf auth logout— Logout from a specific token.[--token-name TEXT --format [auto|human|agent|json|quiet]]hf auth switch— Switch between access tokens.[--token-name TEXT --add-to-git-credential --format [auto|human|agent|json|quiet]]hf auth token— Print the current access token to stdout.[--format [auto|human|agent|json|quiet]]hf auth whoami— Find out which huggingface.co account you are logged in as.[--format [auto|human|agent|json|quiet]]
hf buckets — Commands to interact with buckets.
hf buckets cp SRC— Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf buckets create BUCKET_ID— Create a new bucket.[--private --region [us|eu] --exist-ok --format [auto|human|agent|json|quiet]]hf buckets delete BUCKET_ID— Delete a bucket.[--yes --missing-ok --format [auto|human|agent|json|quiet]]hf buckets info BUCKET_ID— Get info about a bucket.[--format [auto|human|agent|json|quiet]]hf buckets list— List buckets or files in a bucket.[--human-readable --tree --recursive --search TEXT --format [auto|human|agent|json|quiet]]hf buckets move FROM_ID TO_ID— Move (rename) a bucket to a new name or namespace.[--format [auto|human|agent|json|quiet]]hf buckets remove ARGUMENT— Remove files from a bucket.[--recursive --yes --dry-run --include TEXT --exclude TEXT --format [auto|human|agent|json|quiet]]hf buckets settings BUCKET_ID— Update bucket settings (visibility).[--private --public --format [auto|human|agent|json|quiet]]hf buckets sync— Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]
hf cache — Manage local cache directory.
hf cache list— List cached repositories or revisions.[--cache-dir TEXT --revisions --filter TEXT --sort [accessed|accessed:asc|accessed:desc|modified|modified:asc|modified:desc|name|name:asc|name:desc|size|size:asc|size:desc] --limit INTEGER --show-warnings --format [auto|human|agent|json|quiet]]hf cache prune— Remove detached revisions and incomplete downloads from the cache.[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet]]hf cache rm TARGETS— Remove cached repositories, revisions or files. `[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet
Questions fréquentes
Remplace-t-il l'ancienne commande huggingface-cli ?
Oui. La commande hf remplace la commande huggingface-cli, désormais obsolète.
Comment vérifier que je suis connecté ?
Les commandes d'authentification sont regroupées sous hf auth, par exemple hf auth whoami pour afficher votre compte.
Peut-elle lancer des tâches sur Hugging Face ?
Oui. Elle peut lancer et planifier des tâches sur l'infrastructure de Hugging Face, ainsi que gérer les buckets et les dépôts.
Détails
Description originale de l’auteur
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastructure; managing Hugging Face repos; discussions and pull requests; browsing models, datasets and spaces; reading, searching, or browsing academic papers; managing collections; querying datasets; configuring spaces; setting up webhooks; or deploying and managing HF Inference Endpoints. Make sure to us
repo: huggingface/skills
Popularité
- Étoiles GitHub
- 11k
- Position au classement
- #11765
- Licence
- Apache-2.0
- Mis à jour
- 30/10/2026
Commentaires
- …
Autres skills de ce dépôt
hf-cloud-aws-context-discovery
11kAide votre agent à trouver votre profil AWS, votre région et les détails de votre compte avant tout travail cloud, pour qu'il ne devine pas quel compte utiliser.
hf-cloud-python-env-setup
11kAide votre agent à mettre en place un environnement Python propre, avec une version adaptée et des bibliothèques à jour, avant d'exécuter SageMaker ou des automatisations AWS.
hf-cloud-sagemaker-deployment-planner
11kAide votre agent à planifier le déploiement d'un modèle sur Amazon SageMaker, en choisissant un hébergement en temps réel, sans serveur, asynchrone ou par lots, avec des valeurs par défaut raisonnables.
hf-cloud-sagemaker-iam-preflight
11kAide votre agent à confirmer qu'un rôle d'exécution SageMaker utilisable existe avant le déploiement, au lieu de créer de nouvelles autorisations dans votre compte AWS sans vérification.
Skills similaires
pytorch-patterns
280kAide votre agent à utiliser PyTorch pour les modèles de machine learning. Il applique les bonnes pratiques pour un entraînement efficace et des résultats reproductibles.
evm-token-decimals
280kAide votre agent à éviter les erreurs de nombres décimaux sur différents réseaux blockchain. Il garantit des valeurs de tokens exactes dans les transactions et les calculs.
ito-inference
280kPermet à votre agent de vérifier la disponibilité des modèles d'IA. Il relie la demande de calcul au service de modèle prêt à l'emploi.