Hugging Face

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

Jun 4, 2026
Designing the hf CLI as an agent-optimized way to work with the Hub
SummaryAI, from the source post

This post details the re-architecture of the `hf` CLI to support both human and AI agent usage. Key changes include agent-specific output formats (TSV for agents, rich tables for humans), next-command hints for chaining operations, non-blocking commands that are safe to retry, and discoverable commands with examples. Benchmarking shows a significant reduction in token usage for agents when using the `hf` CLI compared to manual SDK/curl usage. The post also introduces the concept of the `hf-cli` skill for agents.

More from the CLI for AI Agents trail