[FEAT] Add CLI feature to fetch and install agents from Swarms market… - #1282
[FEAT] Add CLI feature to fetch and install agents from Swarms market…#1282Steve-Dusty wants to merge 1 commit into
Conversation
|
|
||
|
|
||
| def run_marketplace_search( | ||
| query: str = None, |
Check failure
Code scanning / Pyre
Incompatible variable type Error
|
|
||
| def run_marketplace_search( | ||
| query: str = None, | ||
| category: str = None, |
Check failure
Code scanning / Pyre
Incompatible variable type Error
|
|
||
|
|
||
| def run_marketplace_list( | ||
| category: str = None, |
Check failure
Code scanning / Pyre
Incompatible variable type Error
| ): | ||
| """List available agents in the marketplace.""" | ||
| run_marketplace_search( | ||
| query=None, |
Check failure
Code scanning / Pyre
Incompatible parameter type Error
| from pathlib import Path | ||
| from typing import Any, Dict, List, Optional | ||
|
|
||
| import httpx |
Check failure
Code scanning / Pyre
Undefined import Error
| from typing import Any, Dict, List, Optional | ||
|
|
||
| import httpx | ||
| from loguru import logger |
Check failure
Code scanning / Pyre
Undefined import Error
| } | ||
|
|
||
| if search: | ||
| data["search"] = search |
Check failure
Code scanning / Pyre
Incompatible parameter type Error
| if search: | ||
| data["search"] = search | ||
| if category: | ||
| data["category"] = category |
Check failure
Code scanning / Pyre
Incompatible parameter type Error
| if category: | ||
| data["category"] = category | ||
| if free_only: | ||
| data["priceFilter"] = "free" |
Check failure
Code scanning / Pyre
Incompatible parameter type Error
|
|
||
| return {"agents": agents, "total": total} | ||
|
|
||
| except httpx.HTTPStatusError as e: |
Check failure
Code scanning / Pyre
Invalid except clause Error
swarms marketplaceCLI command to search, browse, and install agents from the Swarms marketplaceChanges
New Files
swarms/utils/agent_marketplace.py- API client withquery_agents(),get_agent_by_id(),install_agent()functionsexamples/marketplace/marketplace_cli_example.py- Usage examplesdocs/swarms/cli/cli_marketplace_guide.md- Full documentationModified Files
swarms/cli/main.py- Added marketplace command and subcommandsswarms/utils/__init__.py- Exported new marketplace functionsdocs/swarms/cli/cli_reference.md- Added marketplace command referencedocs/mkdocs.yml- Added marketplace guide to navigationCLI Commands