Designing the hf CLI as an agent-optimized way to work with the Hub
Which summary reads better? Pick one — models revealed after.Both summaries are AI-generated.
Hugging Face has rebuilt its official hf command-line tool to serve both human users and AI coding agents, automatically detecting when agents like Claude Code, Codex, or Cursor are driving it and tailoring output accordingly. The company reports that agent traffic on the Hub has grown significantly since tracking began in April 2026, with Claude Code alone accounting for roughly 40,000 users and nearly 49 million requests. Benchmarking found that for complex multi-step tasks, agents without the CLI used up to six times as many tokens as those using hf.
The Hugging Face CLI (hf CLI) has been redesigned to optimize interactions for both human users and AI coding agents like Claude Code and Codex. The tool now dynamically adjusts output formats—providing rich, human-readable displays or compact, structured data for agents—based on detected usage. Early data shows significant adoption by coding agents, with Claude Code and Codex leading in user numbers and request volume on the Hub.