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

DevFeed: [Designing the hf CLI as an agent-optimized way to work with the Hub](<https://devfeed.tech/articles/designing-the-hf-cli-as-an-agent-optimized-way-to-work-with-the-hub-7239.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/hf-cli-for-agents>)

Author: Célina Hanouti; Lucain Pouget

Published: 2026-06-04T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [codex](<https://devfeed.tech/topics/codex.md>), [cursor](<https://devfeed.tech/topics/cursor.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [cli](<https://devfeed.tech/tags/cli.md>), [codex](<https://devfeed.tech/tags/codex.md>), [coding](<https://devfeed.tech/tags/coding.md>), [cursor](<https://devfeed.tech/tags/cursor.md>), [hub](<https://devfeed.tech/tags/hub.md>), [huggingface-hub](<https://devfeed.tech/tags/huggingface-hub.md>)

## AI overview

This article describes how Hugging Face rebuilt its CLI for both human users and coding agents. It explains agent detection, output optimized for compact and complete machine-readable results, and benchmarks showing lower token usage than hand-rolled commands or the Python SDK on complex multi-step tasks.

## Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.