Skip to content

Suggestion: persist install-time --target in apm.yml so bare apm update works #1743

@KomTak001

Description

@KomTak001

Summary

When we run apm install <package> --target <harnesses>, the chosen targets are not written into the auto-generated apm.yml. Because of that, apm update currently asks us to pass the same --target flag again.

It would be more convenient if apm update could simply refresh what was already installed, without having to remember and re-type the target list from the initial install.

Motivation

  • On install, specifying --target feels natural—we are choosing which agent harnesses should receive primitives.
  • On update, we usually just want to pull in newer package versions for the same setup. Re-specifying --target each time adds a small but recurring step, and it is easy to mismatch the value used at install time.

APM already documents a target resolution chain (--target > apm.yml targets: > auto-detect > fallback). It looks like the missing piece is persisting targets: into apm.yml when --target is used during apm install.

Docs reference: Install packages — Where files land

Current behavior

  1. Run install with an explicit target:

    apm install example.com/org/my-package#main --target cursor,copilot,claude
    
  2. apm.yml is auto-created with dependencies, but without a targets: field.

  3. Later, run update without --target:

    apm update
    
  4. Update may fail or ask for target disambiguation (e.g. Multiple harnesses detected), so we need to repeat the same --target value from install.

Suggested behavior

On apm install: when --target is passed, persist the resolved target list into apm.yml:

   targets:
     - cursor
     - copilot
     - claude

This would be a one-time manifest update at install time, alongside the existing dependency entries.

On apm update: read targets: from apm.yml and deploy to those harnesses. apm update would not need to modify apm.yml—only apm.lock.yaml (and deployed primitives) would change, which matches how we think about update vs install.

After that, bare apm update would be enough for the common refresh workflow.

--target on update could still override apm.yml for one-off runs, consistent with the documented resolution priority.

Scenario overview

Scenario Suggested behavior
apm install <pkg> --target a,b Write targets: into apm.yml
apm update when targets: is already in apm.yml Use persisted targets; no --target flag needed
apm update Update apm.lock.yaml and redeploy; leave apm.yml unchanged
apm update --target x Override persisted targets for that run only

Workaround (today)

We can manually add targets: to apm.yml after the first install, or start from a template manifest that already includes targets:. That works because apm.yml targets: is already honored by the resolution chain—it is just not set automatically by the recommended one-liner install flow.

Environment

  • APM CLI: 0.19.0
  • OS: macOS / Windows
  • Use case: installing skills/rules into multiple harnesses (cursor, copilot, claude) from a private Git host, then periodically running apm update in the same project directory

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).priority/lowAccepted but not time-sensitivestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions