fix: CLI consistency — remove emojis from output, add -v flag, fix docs#234
fix: CLI consistency — remove emojis from output, add -v flag, fix docs#234Copilot wants to merge 2 commits into
Conversation
Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses items from the CLI Consistency Report by aligning CLI behavior and documentation: removing some emoji-prefixed runtime messages, adding a -v alias for apm install --verbose, and updating docs/cli-reference.md to match observed CLI usage/defaults.
Changes:
- Add
show_default=Truetomcp --limitoptions and add-valias toinstall --verbose. - Remove emoji prefixes from some
depsandconfigruntime output. - Update
docs/cli-reference.mdto fix usage/argument labels and document defaults/order.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/apm_cli/commands/mcp.py |
Shows --limit defaults in --help output via show_default=True. |
src/apm_cli/commands/install.py |
Adds -v short flag alias for --verbose. |
src/apm_cli/commands/deps.py |
Removes emoji prefixes from several deps list runtime messages. |
src/apm_cli/commands/config.py |
Removes emoji from the configuration table title. |
docs/cli-reference.md |
Aligns docs with CLI usage ordering, argument naming, and --limit default. |
Comments suppressed due to low confidence (1)
src/apm_cli/commands/install.py:295
- This PR’s goal is to remove emojis from CLI output, but
apm installstill emits emoji characters (e.g., the "💡" hint messages and_rich_success(..., symbol="sparkles")which maps to an emoji symbol). If the policy is "no emojis in any output", these remaining emoji strings/symbols should be removed or replaced with plain-text equivalents.
@click.option("--force", is_flag=True, help="Overwrite locally-authored files on collision")
@click.option("-v", "--verbose", is_flag=True, help="Show detailed installation information")
@click.option(
"--trust-transitive-mcp",
is_flag=True,
help="Trust self-defined MCP servers from transitive packages (skip re-declaration requirement)",
)
You can also share your feedback on Copilot code review. Take the survey.
| - `--dry-run` - Show what would be installed without installing | ||
| - `--parallel-downloads INT` - Max concurrent package downloads (default: 4, 0 to disable) | ||
| - `--force` - Overwrite locally-authored files on collision | ||
| - `--verbose` - Show detailed installation information |
There was a problem hiding this comment.
apm install now supports the -v short alias, but the CLI reference still documents only --verbose. Update this option entry to reflect -v, --verbose so the docs match the actual CLI flags.
| - `--verbose` - Show detailed installation information | |
| - `-v, --verbose` - Show detailed installation information |
| @click.option("-v", "--verbose", is_flag=True, help="Show detailed installation information") | ||
| @click.option( |
There was a problem hiding this comment.
Adding -v is a new user-facing CLI behavior. There are existing unit/integration tests for apm install, but none appear to cover the -v alias specifically. Please add a small test asserting apm install -v ... is accepted (i.e., does not error with "No such option: -v").
| @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): |
There was a problem hiding this comment.
This module still prints emoji characters in runtime output (e.g., the Rich path prints "⚠" and "💡" in search() output). If this PR is intended to enforce the "no emojis in any output" policy, those remaining emoji strings should be replaced with plain-text indicators.
| # 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") |
There was a problem hiding this comment.
deps.py still contains emoji output in other code paths (e.g., update flows print ✅/
Addresses all items from the 2026-03-10 CLI Consistency Report. Removes emojis from runtime output (confirmed policy violation), adds
-vshort flag toapm install --verbose, and alignsdocs/cli-reference.mdwith actual CLI behavior.Description
Emoji removal (Medium — confirmed policy: "no emojis in any output")
src/apm_cli/commands/deps.py: stripped💡,⚠️,📋prefixes from all runtime messages (both Rich and plain-text paths)src/apm_cli/commands/config.py: removed⚙️fromCurrent APM Configurationtable titleCLI flag consistency (Low)
src/apm_cli/commands/install.py: added-vshort alias to--verbose, matchingapm compile -vbehaviorshow_defaultconsistency (Medium)src/apm_cli/commands/mcp.py: addedshow_default=Trueto--limiton bothmcp list(default: 20) andmcp search(default: 10), matching the pattern already used by--parallel-downloadsDocs alignment (Low/Medium)
apm installusage line:[PACKAGES...] [OPTIONS]→[OPTIONS] [PACKAGES...]apm installoptions reordered to match actual CLI help output orderapm deps info/apm deps updateargument label:PACKAGE_NAME→PACKAGEapm mcp list --limit: added(default: 20)to match siblingmcp searchentryapm runtime statusheading: "Show runtime status" → "Check which runtime will be used"Type of change
Testing
Original prompt
This section details on the original issue you should resolve
<issue_title>[cli-consistency] CLI Consistency Report — 2026-03-10</issue_title>
<issue_description>## CLI Consistency Report
Date: 2026-03-10
APM Version: 0.7.6 (872108a)
Commands Inspected: 30 (plus 2 tested non-existent:
apm mcp install,apm config list)Summary
Medium Severity
Incorrect argument order in
apm installusage docsapm installdocs/cli-reference.mdshows arguments before options, which is the reverse of what the CLI actually displays and the Click convention.apm install [PACKAGES...] [OPTIONS]Usage: apm install [OPTIONS] [PACKAGES]...apm install [OPTIONS] [PACKAGES...]Missing default value for
apm mcp list --limitin docsapm mcp list--limitoption forapm mcp listdoes not document its default (20) indocs/cli-reference.md, while the siblingapm mcp search --limitdoes document its default (10). This asymmetry is misleading.apm mcp listdocs (line 630):--limit INTEGER - Number of results to show(no default)apm mcp searchdocs (line 653):--limit INTEGER - Number of results to show (default: 10)✅apm mcp listdefault=20,apm mcp searchdefault=10--helpoutput, whileapm install --parallel-downloadsdoes show[default: 4]--limit INTEGER - Number of results to show (default: 20). Also consider addingshow_default=Trueto both--limitoptions incli.py(lines 4019 and 4287) for consistency with--parallel-downloads.Emojis appearing in CLI runtime output violates project policy
apm deps list,apm configsrc/apm_cli/commands/deps.pylines 47, 160, 164, 171, 198, 201, 204, 222, 225.INFO:,WARNING:,APM Dependencies) indeps.pyruntime output andconfigcommand table title.Low Severity
deps updateanddeps infoargument name mismatch (docs vs CLI)apm deps update,apm deps infoPACKAGE_NAMEas the argument label in both usage lines and argument descriptions, but the CLI help showsPACKAGE.apm deps update --help:Usage: apm deps update [OPTIONS] [PACKAGE]apm deps info --help:Usage: apm deps info [OPTIONS] PACKAGEapm deps update [PACKAGE_NAME]apm deps info PACKAGE_NAMEPACKAGEinstead ofPACKAGE_NAMEin both commands' usage lines and argument tables for consistency with the CLI.--verboseshort flag-vmissing fromapm installapm install,apm compileapm compilesupports both-vand--verbose, butapm installonly supports--verbose(no short flag). Users who learn-vfromcompilewill be surprised it doesn't work withinstall.apm install --help:--verbose Show detailed installation information(no-v)apm compile --help:-v, --verbose Show detailed source attribution...-vas a short alias for--verboseinapm install, or document this intentional difference explicitly.apm runtime statushelp description mismatchapm runtime statusCheck which runtime will be used`apm runtime status` - Show runtime status`apm runtime status` - Check which runtime will be usedapm installoption order differs between docs and CLI helpapm install--forceand--dry-runoptions in the docs differs from the CLI help output, making it harder to cross-reference.--update,--dry-run,--force,--verbose,--trust-transitive-mcp,--parallel-downloads--update,--force,--dry-run,--parallel-downloads,--verbose, `--trust-transit...💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.