Favicon of Hugging Face CLI

Hugging Face CLI

Command-line client for the Hugging Face Hub. Download models to a local cache, manage repositories, and access hosted inference. Open source under Apache 2.0.

Screenshot of Hugging Face CLI website

Hugging Face CLI is a terminal client for finding, downloading, and sharing models and datasets on the Hugging Face Hub. It's for developers working with local AI, model authors publishing their work, and coding agents that need access to Hub resources. The client runs on your machine and connects to Hugging Face's hosted platform.

The hf CLI can download individual files or entire repositories into a local cache. It also searches models, datasets, and Spaces, so you can find resources and retrieve them without leaving the terminal. For publishing work, it supports file uploads, repository management, and Model Cards that document a model. Pull requests and comments let collaborators discuss changes through the same interface.

Local downloads and cloud execution are separate capabilities. Downloaded files stay in your local cache; uploads go to the Hub. Inference runs on deployed models, and Jobs run on Hugging Face infrastructure. Hub access uses an internet connection, with tokens for authenticated operations.

The CLI shares a package with the huggingface_hub Python library, giving developers terminal and Python interfaces to the same platform. Its commands adapt their output when a coding agent runs them, including agents such as Claude Code, Codex, and Cursor. The client is open source under Apache 2.0. The Hub provides file versioning for models and datasets, including large files.

Similar to Hugging Face CLI