apm icon indicating copy to clipboard operation
apm copied to clipboard

apm plugin init has no way to set the plugin name that apm init --plugin <name> accepted

Open danielmeppiel opened this issue 2 weeks ago • 5 comments

With apm init --plugin removed in 0.37 (#4073), apm plugin init has no equivalent for the positional name argument the old form accepted. Add a name option (or positional) so the migration is complete. Outside #4073's scope; the docs note the gap.

danielmeppiel avatar Nov 20 '26 06:11 danielmeppiel

apm plugin init my-skill already covers the positional name, and #4074 added --version, --author and --description. The remaining gap is --name for naming a plugin scaffolded in place, which apm init --plugin --name offered; the scope record below narrows this issue to that.

danielmeppiel avatar Nov 21 '26 08:11 danielmeppiel

Decision: approve Area: project Scope: Residual after PR #4074 (c564d01e), which gave apm plugin init --version, --author and --description but no --name, so the removed apm init --plugin --name X in-place form has no replacement (reference/cli/init.md "Removed flags" says "--name has no equivalent"). apm plugin init (src/apm_cli/commands/plugin/init.py) gains --name with exactly the meaning apm init --name has today: the name written to apm.yml and plugin.json when scaffolding in place, validated by the existing project-name and _validate_plugin_name checks, and ignored with the existing warning when a positional PROJECT_NAME is given. It passes name= through to _perform_init in src/apm_cli/commands/init.py, the single scaffold owner; no second name rule. _refuse_removed_init_flags in commands/init.py forwards --name into the printed apm plugin init replacement line. Done when: tests/integration/test_init_removed_flags_lifecycle.py gains installed-CLI cells that fail on main d365b877: (1) in an empty directory apm plugin init --yes --name my-plugin exits 0, writes apm.yml and plugin.json in place whose names are my-plugin, and creates no subdirectory; (2) apm init --plugin --name my-plugin --yes exits 2, writes nothing, and its Run: line includes --name my-plugin; (3) an invalid --name exits non-zero and writes nothing. Controls stay green unchanged: test_removed_init_flag_exits_2_and_writes_nothing and test_plugin_init_writes_the_metadata_the_old_flag_offered. Docs: reference/cli/plugin.md synopsis and flag table, the reference/cli/init.md "Removed flags" note, and the apm plugin init row in packages/apm-guide/.apm/skills/apm-usage/commands.md. One Added line in CHANGELOG.md under [Unreleased] ending with the PR number. Out of scope: changing the positional PROJECT_NAME meaning; restoring apm init --plugin; a name option for apm marketplace init; plugin.json or apm.yml schema changes. Review contact: @danielmeppiel

danielmeppiel avatar Nov 21 '26 08:11 danielmeppiel

Moved from 0.38.0 to 0.38.1 in the 0.38 release cut (2026-11-21). Scope and acceptance are unchanged.

danielmeppiel avatar Nov 21 '26 15:11 danielmeppiel

Moved to 0.38.0: maintainer direction is that found bugs and in-flight accepted work ship in 0.38.

danielmeppiel avatar Nov 21 '26 16:11 danielmeppiel

Hi! I'd like to work on this, following the approved scope above. I'll open a PR soon.

AndresDvst avatar Dec 02 '26 11:12 AndresDvst