---
title: "Hf cli"
type: skill
id: "huggingface-skills/hub-and-models/hf-cli"
category: "AI & machine learning"
publisher: "Hugging Face"
license: "Apache-2.0"
source: "https://github.com/huggingface/skills/tree/25910b3"
canonical: "https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/hf-cli"
open_in_pho: "https://pho.chat/customize?item=huggingface-skills%2Fhub-and-models%2Fhf-cli&utm_source=labs&utm_medium=skill-page&utm_campaign=skills-library"
---

# Hf cli

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 use this skill whenever the user mentions 'hf', 'huggingface', 'Hugging Face', 'huggingface-cli', or 'hugging face cli', or wants to do anything related to the Hugging Face ecosystem and to AI and ML in general. Also use for cloud storage needs like training checkpoints, data pipelines, or agent traces. Use even if the user doesn't explicitly ask for a CLI command. Replaces the deprecated `huggingface-cli`.

Source: Hugging Face (Apache 2.0), copied at a pinned commit. Free to use. Part of the Phở Skills library (https://labs.pho.chat/en/skills).
Skill set: Hugging Face Hub and models (https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models.md).

## What it covers
- Commands
  - hf auth — Manage authentication (login, logout, etc.).
  - hf buckets — Commands to interact with buckets.
  - hf cache — Manage local cache directory.
  - hf collections — Interact with collections on the Hub.
  - hf datasets — Interact with datasets on the Hub.
  - hf discussions — Manage discussions and pull requests on the Hub.
  - hf endpoints — Manage Hugging Face Inference Endpoints.
  - hf extensions — Manage hf CLI extensions.
  - hf jobs — Run and manage Jobs on the Hub.
  - hf models — Interact with models on the Hub.
  - hf papers — Interact with papers on the Hub.
  - hf repos — Manage repos on the Hub.
  - hf sandbox — Run and manage experimental sandboxes on Hugging Face Jobs.
  - hf skills — Manage skills for AI assistants.
  - hf spaces — Interact with spaces on the Hub.
  - hf webhooks — Manage webhooks on the Hub.
- Common options
- Mounting repos as local filesystems
- Tips

## Other skills in this set
- [HuggingFace Best Model Finder](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/huggingface-best.md): Use when the user asks about finding the best, top, or recommended model for a task, wants to know what AI model to use, or wants to compare models by benchmark scores. Triggers on: "best model for…
- [Hf mem](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/hf-mem.md): Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub
- [Hugging Face Local Models](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/huggingface-local-models.md): Use to select models to run locally with llama.cpp and GGUF on CPU, Mac Metal, CUDA, or ROCm. Covers finding GGUFs, quant selection, running servers, exact GGUF file lookup, conversion, and…
- [Transformers.js - Machine Learning for JavaScript](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/transformers-js.md): Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript. Supports NLP (text classification, translation, summarization), computer vision (image…
- [Hugging Face Dataset Viewer](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/huggingface-datasets.md): Use this skill for Hugging Face Dataset Viewer API workflows that fetch subset/split metadata, paginate rows, search text, apply filters, download parquet URLs, and read size or statistics.
- [Hugging Face Paper Pages](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/huggingface-papers.md): Look up and read Hugging Face paper pages in markdown, and use the papers API for structured metadata such as authors, linked models/datasets/spaces, Github repo and project page. Use when the user…
- [TRL](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/trl-training.md): Post-train LLMs with TRL (Transformers Reinforcement Learning) — SFT, DPO, GRPO, KTO, and reward-model training. Use when writing or debugging training code with the TRL Python API or the trl CLI.
- [Trackio - Experiment Tracking for ML Training](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/huggingface-trackio.md): Track and visualize ML training experiments with Trackio. Use when logging metrics during training (Python API), firing alerts for training diagnostics, or retrieving/analyzing logged metrics (CLI)…
- [SageMaker Deployment Planner](https://labs.pho.chat/en/skills/huggingface-skills/hub-and-models/hf-cloud-sagemaker-deployment-planner.md): Plan and coordinate the deployment of a model to Amazon SageMaker AI. Use this skill whenever the user wants to deploy, host, serve, or expose a model on SageMaker or AWS — including phrases like…

## Use it
- In Phở: open https://pho.chat/customize?item=huggingface-skills%2Fhub-and-models%2Fhf-cli&utm_source=labs&utm_medium=skill-page&utm_campaign=skills-library and press Try, or add it so Phở loads it whenever a request matches. Phở works with your own API key (OpenAI, Anthropic, Google and others).
- Full instructions (original SKILL.md, unchanged): https://labs.pho.chat/skills/raw/huggingface-skills/hub-and-models/skills/hf-cli/SKILL.md
- Original files: https://github.com/huggingface/skills/tree/25910b3 (Apache 2.0).
- Full machine-readable index: https://labs.pho.chat/skills.json
