[v1.11.0] Semantic Spaces search, Space logs, and more
Discover Spaces using natural language. The new search_spaces() API and hf spaces search CLI use embedding-based semantic search to find relevant Spaces based on what they do - not just keyword matching on their name.
>>> from huggingface_hub import search_spaces
>>> results = search_spaces("remove background from photo")
>>> for space in results:
... print(f"{space.id} (score: {space.score:.2f})")
briaai/BRIA-RMBG-1.4 (score: 0.87)
The same capability is available in the CLI:
$ hf spaces search "remove background from photo" --limit 3
ID TITLE SDK LIKES STAGE CATEGORY SCORE
---------------------------- --------------------- ------ ----- ------- ------------------ -----
not-lain/background-removal Background Removal gradio 2794 RUNNING Image Editing 0.85
briaai/BRIA-RMBG-2.0 BRIA RMBG 2.0 gradio 918 RUNNING Background Removal 0.84
Xenova/remove-background-web Remove Background Web static 739 RUNNING Background Removal 0.81
Hint: Use --description to show AI-generated descriptions.
# Filter by SDK, get JSON with descriptions
$ hf spaces search "chatbot" --sdk gradio --description --json --limit 1 | jq
[
{
"id": "BarBar288/Chatbot",
"title": "Chatbot",
"sdk": "gradio",
"likes": 4,
"stage": "RUNNING",
"category": "Other",
"score": 0.5,
"description": "Perform various AI tasks like chat, image generation, and text-to-speech"
}
]
hf spaces command with semantic search by @Wauplin in #4094When a Space fails to build or crashes at runtime, you can now retrieve the logs programmatically — no need to open the browser. This is particularly useful for agentic workflows that need to debug Space failures autonomously.
>>> from huggingface_hub import fetch_space_logs
# Run logs (default)
>>> for line in fetch_space_logs("username/my-space"):
... print(line, end="")
# Build logs — for BUILD_ERROR debugging
>>> for line in fetch_space_logs("username/my-space", build=True):
... print(line, end="")
# Stream in real time
>>> for line in fetch_space_logs("username/my-space", follow=True):
... print(line, end="")
The CLI equivalent:
$ hf spaces logs username/my-space # run logs
$ hf spaces logs username/my-space --build # build logs
$ hf spaces logs username/my-space -f # stream in real time
$ hf spaces logs username/my-space -n 50 # last 50 lines
fetch_space_logs + hf spaces logs command by @davanstrien in #4091This release continues the CLI output migration started in v1.9, bringing 11 more command groups to the unified --format flag. The old --quiet flags on migrated commands are replaced by --format quiet.
$ hf cache ls # auto-detect (human or agent)
$ hf cache ls --format json # structured JSON
$ hf cache ls --format quiet # minimal output, great for piping
$ hf upload my-model . . # auto-detect (human or agent)
Confirmation prompts (e.g., hf cache rm, hf repos delete, hf buckets delete) are now mode-aware: they prompt in human mode, and require --yes in agent/json/quiet modes - no more hanging scripts.
Commands migrated in this release: collections, discussions, extensions, endpoints, webhooks, cache, repos, repo-files, download, upload, and upload-large-folder. Remaining commands (jobs, buckets, auth login/logout) will follow in a future release.
collections, discussions, extensions, endpoints and webhooks to out singleton by @hanouticelina in #4057hf cache to out singleton by @hanouticelina in #4070out.confirm() and migrate all confirmation prompts by @hanouticelina in #4083repos and repo-files to out singleton + add confirmation to hf repos delete by @hanouticelina in #4097download, upload, upload-large-folder to out singleton by @hanouticelina in #4100A new hf spaces volumes command group lets you manage volumes mounted in Spaces directly from the command line — list, set, and delete using the familiar -v/--volume syntax.
# List mounted volumes
$ hf spaces volumes ls username/my-space
TYPE SOURCE MOUNT_PATH READ_ONLY
------- --------------------- ---------- ---------
model gpt2 /data ✔
dataset badlogicgames/pi-mono /data2 ✔
# Set volumes
$ hf spaces volumes set username/my-space -v hf://buckets/username/my-bucket:/data
$ hf spaces volumes set username/my-space -v hf://models/username/my-model:/models
# Delete all volumes
$ hf spaces volumes delete username/my-space
hf spaces volumes commands by @Wauplin in #4109hf auth token - Prints the current token to stdout, handy for piping into other commands:
$ hf auth token
hf_xxxx
Hint: Run `hf auth whoami` to see which account this token belongs to.
# Use it in a curl call
$ hf auth token | xargs -I {} curl -H "Authorization: Bearer {}" https://huggingface.co/api/whoami-v2
hf auth token command by @Wauplin in #4104model_name deprecated in list_models - Use search instead. Both were always equivalent (both map to ?search=... in the API), but now model_name emits a deprecation warning. Removal is planned for 2.0.
# Before
>>> list_models(model_name="gemma")
# After
>>> list_models(search="gemma")
The CLI is not affected - hf models ls already uses --search.
model_name in favor of search in list_models by @Wauplin in #4112list_liked_repos by @Wauplin in #4078cp -r nesting semantics in copy_files by @Wauplin in #4081.gitattributes when copying repo files to a bucket by @Wauplin in #4082hf_raise_for_status causing delayed object destruction by @Wauplin in #4092repo delete tests missing --yes flag by @hanouticelina in #4101-v/--volume accepts multiple volumes by @davanstrien in #4113Fetched April 16, 2026