hf
CLI extracted from the huggingface_hub library to interact with the Hugging Face Hub
What it is and what it does
hf is a command-line tool extracted from the huggingface_hub library to provide direct access to Hugging Face Hub operations without writing Python code. It handles authentication, model downloads, and other hub interactions through a clean CLI interface.
The package is explicitly designed for command-line use (especially via uv's uvx tool) rather than as a Python library for scripts. If you need programmatic access to the Hub from within Python code, the documentation recommends using huggingface_hub directly instead. The CLI wraps that library's core functionality into shell commands.
Use it for:
- Download pre-trained models directly from the Hub using a single command without writing Python.
- Authenticate with the Hub and check your account status from the command line.
- Manage model and dataset access in CI/CD pipelines or shell scripts.
- Quickly explore Hub resources and metadata without launching a Python interpreter.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A command-line interface for interacting with the Hugging Face Hub—downloading models, managing authentication, and accessing hub resources without writing Python code.
Yes, if you need a lightweight CLI for Hub operations. Install via uvx for one-off commands or as a package if you run Hub CLI tasks frequently. Not suitable if you need programmatic Python access—use huggingface_hub directly for that. No known security issues and active maintenance make it safe to use.
Install
hf on PyPI
pip
pip install hfuv
uv add hfpoetry
poetry add hfInstalling hf
Before you install
Active maintenance with a recent release (7 days old) and low install friction. The package is a thin CLI wrapper around huggingface_hub, so installation is straightforward and dependency overhead is minimal.
License in practice
Apache license is permissive, allowing use in most contexts without significant restrictions.
Quickstart
# Install via uv (recommended)
uvx hf version
# Or install as a package
pip install hf
# Then use the CLI
hf auth whoami
hf download MiniMaxAI/MiniMax-M2
Requires Python >=3.9.0. The package is designed for CLI use via uvx; direct Python script imports are not recommended.
Verify before relying
- Whether the CLI covers all huggingface_hub functionality or only a subset of common operations.
- Performance characteristics when downloading large models or managing many files.
Package facts
| License | Apache (permissive) |
| Python support | supports the current Python release (>=3.9.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — huggingface_hub |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 220,556/month — #9,297 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hf-1.27.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
hf-doc-builderBuilds and previews documentation for Hugging…
permissive · top 15,000 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
spacesProvides utilities for working with Hugging…
permissive · top 15,000 on PyPI
hf-transferAccelerates file transfers to and from the…
unclear · top 5,000 on PyPI
hf-gradioA CLI tool for discovering endpoints and…
permissive · top 5,000 on PyPI
huggingfaceThis package provides a unified interface to…
permissive · top 15,000 on PyPI
kernelsLoads optimized compute kernels from Hugging…
permissive · top 5,000 on PyPI
text-generationProvides a Python client to query text…
permissive · top 15,000 on PyPI
modelscope-hubDownload, upload, and manage AI models,…
permissive · top 5,000 on PyPI