# Install hf with Homebrew

Client library for huggingface.co hub. Version 1.22.0 via Homebrew; verified 2026-07-04.

## Install

```sh
sudo av install brew:hf
```

## Agent safety answer

hf controls Hugging Face model, dataset, and Space workflows.

- **Credential access:** Reads Hugging Face tokens, cache files, repository credentials, and environment variables.
- **Remote mutation:** Can upload, delete, and change models, datasets, and Spaces.
- **Publish/artifact risk:** Publishes ML artifacts, datasets, and app spaces.
- **Recommended control:** Gate upload, delete, login, repo, and token commands.
- **Agent-use guidance:** Allow public model inspection; require approval for uploads, deletes, private repo access, and token use.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install hf
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:hf
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/hf>
- **Version:** 1.22.0
- **Source summary:** Client library for huggingface.co hub
- **Homepage:** <https://huggingface.co/docs/huggingface_hub/guides/cli>
- **Repository:** <https://github.com/huggingface/huggingface_hub>
- **Upstream docs:** <https://huggingface.co/docs/huggingface_hub/guides/cli>
- **License:** Apache-2.0
- **Source archive:** <https://files.pythonhosted.org/packages/77/ea/dc54b4dda5841cb3a7812a178695be776e7c15c597887c2ed892f17d015a/huggingface_hub-1.22.0.tar.gz>
- **Last updated:** 2026-07-04T14:39:31Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- hf (cli)
- huggingface-cli (cli)
- tiny-agents (cli)
- hf (alias)
- huggingface-cli (alias)
- tiny-agents (alias)

## Dependencies

- certifi
- git-lfs
- libyaml
- python@3.14

## Build dependencies

- pkgconf
- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.22.0
- Package-manager updated: 2026-07-04
- Local data: ok
- Upstream repository: https://huggingface.co/docs/huggingface_hub/guides/cli
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

`hf` is the command-line interface distributed with Hugging Face's Hub client tooling. It gives terminal users and scripts direct access to authentication, downloads, uploads, repository management, cache management, Jobs, Spaces, datasets, models, buckets, and related Hub operations.

### Project history

The command comes from the `huggingface_hub` project, Hugging Face's official Python client for the Hub. The library grew with the Hub itself: first as a Python API and `huggingface-cli` utility for interacting with models, datasets, and repositories, then as a broader developer tool for HTTP uploads, cache management, inference clients, Jobs, and agent workflows.

In July 2025 Hugging Face announced the rename from `huggingface-cli` to `hf`. The stated reason was both ergonomics and command organization: the old executable name was long, and the command surface had grown enough that the project adopted a clearer resource-action pattern such as `hf auth login`, `hf download`, `hf upload`, and `hf repo`.

The v1.0 Hugging Face Hub announcement described this CLI evolution as part of a five-year effort to make `huggingface_hub` the foundation layer for open machine learning. In that framing, the CLI moved from a simple command-line helper into a comprehensive ML operations interface, while legacy patterns such as the Git-based `Repository` class and older token helpers were removed in favor of newer HTTP-first APIs.

### Adoption history

The CLI followed Hugging Face's rise as a central exchange for open ML artifacts. It is documented as part of `huggingface_hub`, installable through the core Python package, a standalone installer, `uvx hf`, and Homebrew. The Homebrew formula gives non-Python-first users a conventional package-manager route while still delivering the Hub CLI.

The executable list in the input records both `hf` and `huggingface-cli`, reflecting the transition period where existing automation may still call the legacy command name. Hugging Face's own blog post positioned the shorter command as the path for future CLI organization.

### How it is used

`hf auth login` stores credentials for Hub operations; the environment-variable documentation says the token path defaults to `$HF_HOME/token`, which is normally `~/.cache/huggingface/token`. Other common commands download and upload files, create and manage repositories, inspect or remove local cache entries, run Jobs, work with Spaces, and interact with models, datasets, collections, endpoints, buckets, and webhooks.

For package users, `hf` is the terminal complement to the Python API. It is used in CI pipelines, model publishing scripts, cache cleanup, large-folder uploads, private-repository downloads, and agent/tooling workflows that need a stable command-line interface to the Hub.

### Why package nerds care

`hf` is significant because it packages a cloud ML platform into a single Unix-style command with predictable subcommands. It is also a snapshot of the Python packaging-to-system-packaging boundary: the same tool can arrive through pip, a standalone installer, uvx, or Homebrew, and its credential/cache conventions must behave consistently across those routes.

The rename from `huggingface-cli` to `hf` is package-nerd notable because it created the usual compatibility question around executable names, aliases, formula names, shell completion, and scripts written before the CLI redesign.

### Timeline

- 2020s: `huggingface_hub` developed as Hugging Face's Python client for Hub models, datasets, Spaces, and repository operations.
- 2025-07-25: Hugging Face announced that the CLI had been renamed from `huggingface-cli` to `hf`.
- 2025: The CLI used a resource-action command pattern for auth, download, upload, repo, cache, and Jobs workflows.
- 2025: Hugging Face described the Hub client v1.0 as the result of five years of building the foundation of open machine learning.
- Package-manager era: Homebrew packages the CLI as `hf`, while the input still records the legacy `huggingface-cli` executable for compatibility.

### Related projects

- `hf` is related to `huggingface_hub`, the Hugging Face Hub, HfApi, HfFileSystem, Hugging Face Jobs, Spaces, Storage Buckets, Inference Endpoints, Tiny Agents, and the legacy `huggingface-cli` command.

### Sources

- <https://formulae.brew.sh/formula/hf>
- <https://github.com/huggingface/huggingface_hub>
- <https://huggingface.co/blog/hf-cli>
- <https://huggingface.co/blog/huggingface-hub-v1>
- <https://huggingface.co/docs/huggingface_hub/guides/cli>
- <https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables>


## Security Notes

No matching local secret-handling manifest was found for hf. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- Unix: ~/.cache/huggingface/token
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hf
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [git-lfs](https://www.automicvault.com/pkg/brew/git-lfs/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [hf-mcp-server](https://www.automicvault.com/pkg/brew/hf-mcp-server/) - Shares av.db curated category or tags: cli, developer-tools, hugging-face, machine-learning.
- [text-embeddings-inference](https://www.automicvault.com/pkg/brew/text-embeddings-inference/) - Shares av.db curated category or tags: cli, developer-tools, hugging-face, machine-learning.
- [crf++](https://www.automicvault.com/pkg/brew/crf/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [dvc](https://www.automicvault.com/pkg/brew/dvc/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [llama.cpp](https://www.automicvault.com/pkg/brew/llama-cpp/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [mlx](https://www.automicvault.com/pkg/brew/mlx/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [mlx-lm](https://www.automicvault.com/pkg/brew/mlx-lm/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [pytorch](https://www.automicvault.com/pkg/brew/pytorch/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.

## Combined YAML source

View the package source record on GitHub. [combined/hf.yml](https://github.com/automic-vault/db/blob/main/combined/hf.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
- curated agent safety answer
