🔍 Semantic search for Spaces
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"
}
]📜 Programmatic access to Space logs
When 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🖥️ CLI output standardization continues
This 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.
- Migrate
collections,discussions,extensions,endpointsandwebhookstooutsingleton by @hanouticelina in #4057 - Migrate
hf cachetooutsingleton by @hanouticelina in #4070 - Add
out.confirm()and migrate all confirmation prompts by @hanouticelina in #4083 - Migrate
reposandrepo-filestooutsingleton + add confirmation tohf repos deleteby @hanouticelina in #4097 - Migrate
download,upload,upload-large-foldertooutsingleton by @hanouticelina in #4100
📦 Space volumes management from the CLI
A 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🔧 More CLI improvements
hf 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💔 Breaking change
model_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.
🔧 Other improvements
🐛 Bug fixes
- Fix copy file to folder by @Wauplin in #4075
- Match Unix
cp -rnesting semantics incopy_filesby @Wauplin in #4081 - Ignore
.gitattributeswhen copying repo files to a bucket by @Wauplin in #4082 - Fix reference cycle in
hf_raise_for_statuscausing delayed object destruction by @Wauplin in #4092 - Fix
repo deletetests missing--yesflag by @hanouticelina in #4101
📖 Documentation
- Update copy files CLI docs by @Wauplin in #4095
- Fix copy files docs by @Wauplin in #4096
- Give manage-spaces walkthrough steps real headings by @davanstrien in #4108
- Clarify that
-v/--volumeaccepts multiple volumes by @davanstrien in #4113
🏗️ Internal
- [CI] Fix Opencode checksum validation by @Wauplin in #4073
- Post-release: bump version to 1.11.0.dev0 by @huggingface-hub-bot[bot] in #4074
- [Release] Notify PRs included in a release by @Wauplin in #4077
- Update staging CI user by @Wauplin in #4093
- Remove unused inputs from release workflow by @Wauplin in #4098
- Bump doc-builder SHA for PR upload workflow by @rtrompier in #4103
- [Internal] Update AGENTS.md by @Wauplin in #4110