-
Notifications
You must be signed in to change notification settings - Fork 168
fix: CLI consistency — remove emojis from output, add -v flag, fix docs #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,10 +44,10 @@ def list_packages(): | |
| # Check if apm_modules exists | ||
| if not apm_modules_path.exists(): | ||
| if has_rich: | ||
| console.print("💡 No APM dependencies installed yet", style="cyan") | ||
| console.print("No APM dependencies installed yet", style="cyan") | ||
| console.print("Run 'apm install' to install dependencies from apm.yml", style="dim") | ||
| else: | ||
| click.echo("💡 No APM dependencies installed yet") | ||
| click.echo("No APM dependencies installed yet") | ||
| click.echo("Run 'apm install' to install dependencies from apm.yml") | ||
| return | ||
|
|
||
|
|
@@ -157,18 +157,18 @@ def list_packages(): | |
| 'is_orphaned': is_orphaned | ||
| }) | ||
| except Exception as e: | ||
| click.echo(f"⚠️ Warning: Failed to read package {org_repo_name}: {e}") | ||
| click.echo(f"Warning: Failed to read package {org_repo_name}: {e}") | ||
|
|
||
| if not installed_packages: | ||
| if has_rich: | ||
| console.print("💡 apm_modules/ directory exists but contains no valid packages", style="cyan") | ||
| console.print("apm_modules/ directory exists but contains no valid packages", style="cyan") | ||
| else: | ||
| click.echo("💡 apm_modules/ directory exists but contains no valid packages") | ||
| click.echo("apm_modules/ directory exists but contains no valid packages") | ||
| return | ||
|
|
||
| # Display packages in table format | ||
| if has_rich: | ||
| table = Table(title="📋 APM Dependencies", show_header=True, header_style="bold cyan") | ||
| table = Table(title="APM Dependencies", show_header=True, header_style="bold cyan") | ||
| table.add_column("Package", style="bold white") | ||
| table.add_column("Version", style="yellow") | ||
|
Comment on lines
169
to
173
|
||
| table.add_column("Source", style="blue") | ||
|
|
@@ -195,13 +195,13 @@ def list_packages(): | |
|
|
||
| # Show orphaned packages warning | ||
| if orphaned_packages: | ||
| console.print(f"\n⚠️ {len(orphaned_packages)} orphaned package(s) found (not in apm.yml):", style="yellow") | ||
| console.print(f"\n{len(orphaned_packages)} orphaned package(s) found (not in apm.yml):", style="yellow") | ||
| for pkg in orphaned_packages: | ||
| console.print(f" • {pkg}", style="dim yellow") | ||
| console.print("\n💡 Run 'apm prune' to remove orphaned packages", style="cyan") | ||
| console.print("\nRun 'apm prune' to remove orphaned packages", style="cyan") | ||
| else: | ||
| # Fallback text table | ||
| click.echo("📋 APM Dependencies:") | ||
| click.echo("APM Dependencies:") | ||
| click.echo(f"{'Package':<30} {'Version':<10} {'Source':<12} {'Prompts':>7} {'Instr':>7} {'Agents':>7} {'Skills':>7} {'Hooks':>7}") | ||
| click.echo("-" * 98) | ||
|
|
||
|
|
@@ -219,10 +219,10 @@ def list_packages(): | |
|
|
||
| # Show orphaned packages warning | ||
| if orphaned_packages: | ||
| click.echo(f"\n⚠️ {len(orphaned_packages)} orphaned package(s) found (not in apm.yml):") | ||
| click.echo(f"\n{len(orphaned_packages)} orphaned package(s) found (not in apm.yml):") | ||
| for pkg in orphaned_packages: | ||
| click.echo(f" • {pkg}") | ||
| click.echo("\n💡 Run 'apm prune' to remove orphaned packages") | ||
| click.echo("\nRun 'apm prune' to remove orphaned packages") | ||
|
|
||
| except Exception as e: | ||
| _rich_error(f"Error listing dependencies: {e}") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -287,7 +287,7 @@ def _validate_package_exists(package): | |
| "--dry-run", is_flag=True, help="Show what would be installed without installing" | ||
| ) | ||
| @click.option("--force", is_flag=True, help="Overwrite locally-authored files on collision") | ||
| @click.option("--verbose", is_flag=True, help="Show detailed installation information") | ||
| @click.option("-v", "--verbose", is_flag=True, help="Show detailed installation information") | ||
| @click.option( | ||
|
Comment on lines
+290
to
291
|
||
| "--trust-transitive-mcp", | ||
| is_flag=True, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ def mcp(): | |
|
|
||
| @mcp.command(help="Search MCP servers in registry") | ||
| @click.argument("query", required=True) | ||
| @click.option("--limit", default=10, help="Number of results to show") | ||
| @click.option("--limit", default=10, show_default=True, help="Number of results to show") | ||
| @click.pass_context | ||
| def search(ctx, query, limit): | ||
|
Comment on lines
21
to
25
|
||
| """Search for MCP servers in the registry.""" | ||
|
|
@@ -288,7 +288,7 @@ def show(ctx, server_name): | |
|
|
||
|
|
||
| @mcp.command(help="List all available MCP servers") | ||
| @click.option("--limit", default=20, help="Number of results to show") | ||
| @click.option("--limit", default=20, show_default=True, help="Number of results to show") | ||
| @click.pass_context | ||
| def list(ctx, limit): | ||
| """List all available MCP servers in the registry.""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apm installnow supports the-vshort alias, but the CLI reference still documents only--verbose. Update this option entry to reflect-v, --verboseso the docs match the actual CLI flags.