fix: CLI consistency improvements (target aliases, deps clean flags, verbose shorthand, help text)#303
fix: CLI consistency improvements (target aliases, deps clean flags, verbose shorthand, help text)#303
Conversation
Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com>
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 CLI consistency gaps across APM commands by standardizing target aliasing/help text, adding safety flags to destructive operations, and aligning documentation with the CLI.
Changes:
- Reorders
apm pack --targetchoices and updates alias wording to prefervscodewithcopilotas an alias. - Adds
--dry-runand--yes/-ytoapm deps clean, and improves related docs/help defaults elsewhere (apm mcp list --limit,apm install --verboseshorthand). - Updates CLI help text (
apm runtime status) and refreshes parts of the CLI reference docs.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Bumps locked editable project version to 0.7.9. |
| src/apm_cli/commands/runtime.py | Updates apm runtime status command help text. |
| src/apm_cli/commands/pack.py | Reorders --target choices and flips alias wording to copilot → alias of vscode. |
| src/apm_cli/commands/mcp.py | Ensures --limit default is shown in help for apm mcp list. |
| src/apm_cli/commands/install.py | Adds -v shorthand for --verbose. |
| src/apm_cli/commands/deps.py | Adds --dry-run and --yes/-y to apm deps clean. |
| docs/src/content/docs/reference/cli-commands.md | Documents new deps clean flags, renames deps update arg in docs, updates mcp list default, and adjusts runtime status heading. |
You can also share your feedback on Copilot code review. Take the survey.
src/apm_cli/commands/deps.py
Outdated
| # Show what will be removed | ||
| package_count = len([d for d in apm_modules_path.iterdir() if d.is_dir()]) | ||
|
|
||
| _rich_warning(f"This will remove the entire apm_modules/ directory ({package_count} packages)") | ||
| if dry_run: | ||
| _rich_info(f"Dry run: would remove apm_modules/ ({package_count} packages)") | ||
| return |
| @deps.command(help="Remove all APM dependencies") | ||
| def clean(): | ||
| @click.option("--dry-run", is_flag=True, default=False, help="Show what would be removed without removing") | ||
| @click.option("--yes", "-y", is_flag=True, default=False, help="Skip confirmation prompt") | ||
| def clean(dry_run: bool, yes: bool): |
src/apm_cli/commands/runtime.py
Outdated
| @runtime.command(help="Check which runtime will be used") | ||
| @runtime.command(help="Show active runtime and preference order") | ||
| def status(): | ||
| """Show which runtime APM will use for execution.""" |
| apm deps clean [OPTIONS] | ||
| ``` | ||
|
|
||
| **Options:** | ||
| - `--dry-run` - Show what would be removed without removing | ||
| - `--yes`, `-y` - Skip confirmation prompt (for non-interactive/scripted use) | ||
|
|
|
@copilot review conflicts |
…tring, and docs Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com>
Addressed all 4 review conflicts in commit b408d07:
|
Addresses all 6 findings from the CLI Consistency Report (2026-03-13). Standardizes option conventions across commands and aligns CLI help text with documentation.
Description
Medium severity
apm pack --target: Swapped choice order to[vscode|copilot|claude|all]—vscodeis now primary,copilotis the alias. Matchesapm compileconvention. Docs updated to reflect new ordering and alias wording.apm deps clean: Added--dry-run(preview without deleting, lists each package that would be removed) and--yes/-y(skip confirmation for CI). Package count now uses_scan_installed_packages()for accuracy (counts actual installed packages, not top-level org directories). Consistent with other destructive commands (prune,uninstall).apm mcp list --limit: Addedshow_default=True→ help now shows[default: 20], matchingapm mcp search.Low severity
apm install --verbose: Added-vshort flag, matchingapm compile.apm deps updatedocs: Renamed argument fromPACKAGE_NAME→PACKAGEto match the actual CLI usage string.apm runtime status: Updated CLI help text and function docstring to"Show active runtime and preference order", aligning with docs phrasing.Documentation in
docs/src/content/docs/reference/cli-commands.mdupdated to reflect all changes.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-13</issue_title>
<issue_description>## CLI Consistency Report
Date: 2026-03-13
APM Version: 0.7.8 (09fef91)
Commands Inspected: 30
Summary
Medium Severity
1.
--targetvalues differ betweenapm packandapm compileapm pack,apm compileapm packtreatscopilotas the canonical value (withvscodeas an alias).apm compiletreatsvscodeas the canonical value (withagentsas an alias). Users switching between the two commands face inconsistent terminology.vscodeas the primary value across both commands (matching the VSCode-facing branding). Inapm pack, swap so the accepted values are[vscode|copilot|claude|all]with a note thatcopilotis the alias forvscode.2.
apm deps cleanis missing--dry-runand--yesflagsapm deps cleanapm deps cleanremoves the entireapm_modules/directory but offers no--dry-runpreview and no--yesflag for non-interactive/scripted use. Every other destructive operation in the CLI supports--dry-run(install,uninstall,prune,pack,unpack), andapm runtime removehas--yes. The asymmetry makesdeps cleanharder to use safely in CI pipelines.--dry-run(show what would be removed) and--yes/-y(skip the interactive confirmation prompt) toapm deps clean.3.
apm mcp list --limitdoes not display a default value;apm mcp search --limitdoesapm mcp list,apm mcp search--limit INTEGERoption, but onlyapm mcp searchannotates the default value in the help text. Users runningapm mcp listcannot tell how many results will be returned without reading the source or running the command.default=parameter to the--limitoption inapm mcp listso the help text displays[default: N], matchingapm mcp search.Low Severity
4.
--verbosehas a short flag (-v) inapm compilebut not inapm installapm install,apm compile--verboseflag but onlyapm compileadds the-vshorthand. Users who habitually type-vfor verbose output inapm installget an error.-vas a short flag for--verboseinapm install.5.
apm deps updateargument name differs between CLI and docsapm deps updatePACKAGE, but the documentation atdocs/src/content/docs/reference/cli-commands.mdrefers to it asPACKAGE_NAME. While functionally harmless, it creates confusion when cross-referencing.PACKAGEto match the actual CLI usage string, or update the CLI source to usePACKAGE_NAMEfor clarity.6.
apm runtime statusdescription diverges between CLI and...📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.