Skip to content

Commit 23f95d9

Browse files
committed
Improve: Organize plugins by marketplace in browse output
When viewing all plugins without specifying a marketplace, plugins are now organized and grouped by their source marketplace/repository for better readability and navigation. Output structure: All Available Plugins: Total: 565 plugins anthropic-agent-skills: - document-skills - example-skills awesome-claude-code-plugins: - documentation-generator - analyze-codebase ... This makes it easier to: - Identify which marketplace each plugin comes from - Browse plugins by source - Understand the distribution across marketplaces
1 parent 22ba317 commit 23f95d9

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

code_assistant_manager/cli/plugin_commands.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -926,18 +926,35 @@ def browse_marketplace(
926926
# Filter and display
927927
plugins = _filter_plugins(all_plugins, query, category)
928928
total = len(plugins)
929-
plugins = plugins[:limit]
930929

931930
typer.echo(f"{Colors.BOLD}All Available Plugins:{Colors.RESET}")
932931
typer.echo(f"Total: {total} plugins\n")
933932

934933
if query or category:
935934
typer.echo(f"Matching: {total}\n")
936935

937-
typer.echo(f"{Colors.BOLD}Plugins:{Colors.RESET}\n")
938-
936+
# Organize plugins by marketplace
937+
plugins_by_marketplace = {}
939938
for plugin in plugins:
940-
_display_plugin(plugin)
939+
marketplace = plugin.get("marketplace", "Unknown")
940+
if marketplace not in plugins_by_marketplace:
941+
plugins_by_marketplace[marketplace] = []
942+
plugins_by_marketplace[marketplace].append(plugin)
943+
944+
# Display plugins organized by marketplace
945+
displayed_count = 0
946+
for marketplace_name in sorted(plugins_by_marketplace.keys()):
947+
marketplace_plugins = plugins_by_marketplace[marketplace_name]
948+
typer.echo(f"\n{Colors.BOLD}{marketplace_name}:{Colors.RESET}\n")
949+
950+
for plugin in marketplace_plugins:
951+
if displayed_count >= limit:
952+
break
953+
_display_plugin(plugin)
954+
displayed_count += 1
955+
956+
if displayed_count >= limit:
957+
break
941958

942959
if total > limit:
943960
typer.echo(f"\n ... and {total - limit} more")

0 commit comments

Comments
 (0)