-
Notifications
You must be signed in to change notification settings - Fork 873
Open
Description
Add a new CLI command hf repo list that allows users to list repositories (models, spaces, or datasets) hosted on the Hub with filtering capabilities. This command will basically be a wrap the existing Python API methods list_models(), list_spaces(), and list_datasets().
Proposed API
# List models (default)
hf repo list
# list datasets or spaces
hf repo list --repo-type dataset
hf repo list --repo-type space
# Limit results (default value set to 10)
hf repo list --limit 15
# Filter by task/tag
hf repo list --filter text-classification
hf repo list --filter conversational
# Search by name
hf repo list --search bert
# Filter by author/organization
hf repo list --author google
hf repo list --search embeddingemma --author google
# Sort results
hf repo list --sort likes
hf repo list --sort trending_score
hf repo list --sort downloads:asc # ascending
Example Output
> hf repo list --author google --limit 2
[
{
"id": "google/gemma-3-4b-it",
"downloads": 1037748,
"likes": 1023,
"trendingScore": 25,
"createdAt": "2025-02-20T21:20:07Z",
"private": false,
"pipeline_tag": "image-text-to-text",
"library_name": "transformers"
},
{
"id": "google/embeddinggemma-300m",
"downloads": 953530,
"likes": 1320,
"trendingScore": 18,
"createdAt": "2025-07-17T19:53:55Z",
"private": false,
"pipeline_tag": "sentence-similarity",
"library_name": "sentence-transformers"
}
]Metadata
Metadata
Assignees
Labels
No labels