Twitter/X

The 𝚑𝚏 CLI now detects when an AI agent is using it and returns clean…

Brief

The 𝚑𝚏 CLI was rebuilt with AI agents in mind: it detects agent use and provides token‑efficient output, next‑command hints, and other features to reduce tokens and steps when interacting with the Hugging Face Hub. Benchmarks on 18 Hub tasks (Claude Code and Codex) found curl/Python SDK used up to 6× more tokens on complex tasks and were less reliable than the CLI.

Why it matters

The 𝚑𝚏 CLI now detects when an AI agent is using it and returns clean, token-efficient output plus next-command hints and other agent-facing features to minimize tokens and steps on the Hugging Face Hub.

Key details

  • Benchmarks across 18 Hub tasks on Claude Code and Codex show using curl or the Python SDK consumed up to 6× more tokens on complex tasks, and the 𝚑𝚏 CLI completed those tasks more reliably.
Source evidence

A couple of weeks ago we started rebuilding the 𝚑𝚏 CLI with AI agents in mind. it now detects when an agent is using it and gives clean, token-efficient output, next-command hints, and more, all designed to minimize the tokens and steps an agent needs to get things done on the Hugging Face Hub!

We benchmarked it across 18 Hub tasks on Claude Code and Codex: without the 𝚑𝚏 CLI, using curl or the Python SDK took up to 6x as many tokens on complex tasks, and the CLI completed them more reliably.

🧵