huggingface_hub
The official CLI and Python client for the Hugging Face Hub.
What is huggingface_hub?
The official CLI and Python client for the Hugging Face Hub.
Overview of huggingface_hub
What it is
The huggingface_hub library is the official CLI and Python client for the Hugging Face Hub, a platform that democratizes open-source Machine Learning for creators and collaborators. It provides two interfaces: the hf CLI for the terminal and the huggingface_hub Python library. Both are designed to work for humans and AI agents, enabling interaction with models, datasets, Spaces, and other resources hosted on the Hub.
Key features
- Download files or entire repositories from the Hub.
- Upload files and folders to the Hub.
- Manage repositories (create, update, delete).
- Run inference on deployed models.
- Run jobs on Hugging Face infrastructure.
- Search for models, datasets, and Spaces.
- Share Model Cards and engage with the community through pull requests and comments.
- Use the
hfCLI for all operations from the terminal.
Use cases
- Discover and download pre-trained models and datasets for machine learning projects.
- Play with thousands of machine learning apps hosted on the Hub.
- Create and share your own models, datasets, and demos with the community.
- Automate workflows with the CLI or Python library, including for AI coding agents.
Getting started
Install the hf CLI with the standalone installer: bash # On macOS and Linux. curl -LsSf https://hf.co/cli/install.sh | bash powershell # On Windows. powershell -ExecutionPolicy ByPass -c 'irm https://hf.co/cli/install.ps1 | iex' Log in and start working: bash hf auth login hf download Qwen/Qwen3-0.6B Alternatively, install the Python package with pip: bash pip install huggingface_hub Or with uv: bash uv pip install huggingface_hub See the repository README for more details.
License and pricing
The library is licensed under Apache-2.0 and is open source (free to use).
Based on the project's public README and repository metadata.