Automic VaultAutomic Vault

brew

使用 Homebrew 安装 hf

查看 hf 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

代理安全

代理安全回答

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

凭据访问

Reads Hugging Face tokens, cache files, repository credentials, and environment variables.

远程变更

Can upload, delete, and change models, datasets, and Spaces.

发布/制品风险

Publishes ML artifacts, datasets, and app spaces.

推荐控制

Gate upload, delete, login, repo, and token commands.

代理使用指南

Allow public model inspection; require approval for uploads, deletes, private repo access, and token use.

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install hf

local Homebrew formula metadata

概览

软件包摘要

Client library for huggingface.co hub

命令和别名

  • hf
  • huggingface-cli
  • tiny-agents

历史

项目历史与用法

`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.

项目历史

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.

采用历史

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.

使用方式

`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.

为什么软件包爱好者会关心

`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.

时间线

  • 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.

安全态势

尚未找到受保护工具覆盖

没有找到 hf 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 4 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

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

Credential-bearing paths to review before unattended agent runs.

Unix
~/.cache/huggingface/token

可执行文件

已安装的可执行文件

命令类型暴露范围备注
hfcli全局可执行文件
huggingface-clicli全局可执行文件
tiny-agentscli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本1.24.0
管理器更新时间2026-07-18
本地数据OK
上游not checked
检测到的最新版本未检测到

https://huggingface.co/docs/huggingface_hub/guides/cli

安装元数据

软件包元数据

软件包键brew:hf
版本1.24.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/hf
主页https://huggingface.co/docs/huggingface_hub/guides/cli
仓库https://github.com/huggingface/huggingface_hub
上游文档https://huggingface.co/docs/huggingface_hub/guides/cli
许可证Apache-2.0
源码归档https://files.pythonhosted.org/packages/df/9b/d3bb4e7d792835daf34dd7091bbc7d7b4e0437d9388f1ea7239cce49f478/huggingface_hub-1.24.0.tar.gz
最后更新2026-07-18T12:20:02Z
Pulseupdated
依赖certifi, git-lfs, libyaml, python@3.14
构建依赖pkgconf, rust
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namehf
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

Combined YAML source

View the package source record on GitHub.

combined/hf.yml

使用的来源

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