skillfed

hf

CLI extracted from the huggingface_hub library to interact with the Hugging Face Hub

hf v1.27.0 220.6K downloads/30d#9,297 on PyPI3,801
Permissive license Apache Active released

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 hf

uv

uv add hf

poetry

poetry add hf

Installing 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

hugging face cli tooldownload models from hubhuggingface command linemodel hub authenticationhf hub cli interface
cli-toolmodel-hub

More Utilities packages