Implement plugin management system and CLI commands#83
Implement plugin management system and CLI commands#83SebastienDegodez wants to merge 1 commit intomicrosoft:mainfrom
Conversation
9af6e95 to
4764a8d
Compare
There was a problem hiding this comment.
Pull request overview
Adds a first-cut plugin marketplace + resolver layer and exposes it via new apm plugin CLI commands, with docs and fixtures to support plugin installation/integration workflows.
Changes:
- Introduces
MarketplaceManager/PluginResolverfor resolvingplugin-id@marketplaceinto a repository URL. - Adds
apm plugin install(tracks plugins inapm.yml) andapm plugin list(marketplace browsing) commands. - Extends
apm installto also install entries fromapm.yml: plugins, and adds docs + test fixtures around plugin primitives.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 30 comments.
Show a summary per file
| File | Description |
|---|---|
src/apm_cli/plugin/marketplace.py |
Adds marketplace fetching/parsing and plugin listing/lookup. |
src/apm_cli/plugin/resolver.py |
Adds parsing/resolution for plugin-id@marketplace specs. |
src/apm_cli/commands/plugin.py |
Adds Click CLI group/commands for plugin install/list and apm.yml tracking. |
src/apm_cli/cli.py |
Loads plugins: from apm.yml and installs them alongside APM deps. |
src/apm_cli/models/apm_package.py |
Adds a placeholder get_plugins() method. |
tests/unit/test_plugin_system.py |
Unit tests for marketplace parsing and resolver behavior. |
tests/integration/test_plugin_integration.py |
Integration-style tests around primitive integration using a mock plugin fixture. |
tests/fixtures/mock-plugin/** |
Adds a mock plugin repo layout with .apm/* primitives for tests. |
docs/plugins.md |
New plugin system guide. |
docs/index.md |
Adds link to plugin guide. |
docs/cli-reference.md |
Documents new apm plugin commands. |
| @click.group(help="Manage APM plugins from Claude Code and GitHub marketplaces") | ||
| def plugin(): |
There was a problem hiding this comment.
The click group help string for apm plugin doesn’t follow the repo’s CLI help convention of including a contextual emoji, which makes help output inconsistent with other commands. Please update the group help= to include an appropriate emoji (and keep it consistent with docs/cli-reference.md).
tests/unit/test_plugin_system.py
Outdated
| import tempfile | ||
| from pathlib import Path | ||
| from unittest.mock import patch, MagicMock | ||
| import requests |
There was a problem hiding this comment.
Import of 'requests' is not used.
| import requests |
9b10d45 to
a4f6f1c
Compare
| shutil.rmtree(repo_dir) | ||
| console.print( | ||
| f"{STATUS_SYMBOLS.get('success', '✓')} Plugin '{plugin_id}' uninstalled" | ||
| ) |
There was a problem hiding this comment.
console is used here but is not defined in this scope, so uninstalling a plugin will raise NameError after removing the directory. Use console = _get_console() (or _rich_success) before printing the uninstall confirmation.
a74b217 to
61e8ebb
Compare
Signed-off-by: SebastienDegodez <sebastien.degodez@gmail.com>
61e8ebb to
fb35cd6
Compare
|
@SebastienDegodez — thank you for this. The plugin marketplace ecosystem is an industry standard now and APM needs to support it. This review is about routing it through APM's existing architecture, not building alongside it. Decision: Request changesAPM's detection pattern (how it works today)APM already handles five foreign formats, all the same way: No flags. No separate commands. What plugin support should look likeThe same pattern, extended: When the downloader finds
The user experience is just: apm install anthropics/claude-code-plugins/commit-commandsOr in dependencies:
apm:
- company/coding-standards#v2.0
- anthropics/claude-code-plugins/commit-commands#v1.2.0That's it. No The marketplace discovery questionThe useful part of your PR — But that's a browsing concern, not an install concern. Once a user knows the repo, it's just If we want APM to help with discovery later, it can be a lightweight convenience: apm browse claude # opens marketplace URL in browserBut that's a separate, smaller feature — not a prerequisite for plugin support. What to keep from your PR
Implementation planPhase 1 —
Result: Phase 2 — Marketplace source resolution (optional, later) Your Why this matters architecturallyAPM currently has one install pipeline, one manifest format, one discovery system, one lock file. Every foreign format normalizes into that single model. This is the project's most important architectural invariant — it's what makes APM "the npm for agent primitives" rather than "a wrapper around five different tools." PR #83 as written breaks that invariant by creating a parallel pipeline. The plugin ecosystem deserves full support — but through the existing architecture, not alongside it. Your |
|
Hello @danielmeppiel , sorry I'm in holidays. Can you take this Pull Request or you can wait one moment ? |
Introduce a plugin management system along with CLI commands for installing and managing plugins from various marketplaces. This enhancement aims to streamline plugin integration and improve user experience.