跳到正文
原文
Hugging Face Blog·· 2026-06-04精选AI 评分66

Hugging Face 重构 hf CLI,让编码 Agent 更高效地使用 Hub

Designing the hf CLI as an agent-optimized way to work with the Hub

AI 导读

Hugging Face 重构官方 hf CLI,使其同时服务人类和 Claude Code、Codex、Cursor 等编码 Agent,hf v1.9.0 引入按环境变量自动检测的 agent 模式,输出 TSV、完整字段、无 ANSI、不截断,并提供 next-command 提示、--yes/--dry-run 等安全重试设计。

推荐理由

官方实测数据显示 CLI 在多步 Hub 任务上可把 token 消耗降到手工 curl/SDK 的几分之一,方法与结论可迁移给 Agent 工具设计。

来源:Hugging Face Blog · huggingface.co