-
Notifications
You must be signed in to change notification settings - Fork 148
Feature: support lockfile-only resolution (apm lock) #975
Copy link
Copy link
Open
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.Lockfile schema, per-file provenance, integrity hashes, drift detection.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Milestone
Metadata
Metadata
Assignees
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.Lockfile schema, per-file provenance, integrity hashes, drift detection.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Type
Projects
Status
Todo
Problem
apm installtoday is a single, all-or-nothing command: it resolves dependencies, writesapm.lock.yaml, and deploys files into target directories (.github/,.cursor/,.opencode/, etc.) in one shot. There is no mode that stops after the lockfile is written.This blocks the declarative dotfiles workflow that users of Nix Home Manager, chezmoi, GNU Stow, yadm, and similar managers expect:
apm.yml("I want these packages")apm.lock.yamlapm.yml+apm.lock.yamlto a dotfiles repo (no generated.github/mirror)home-manager switch,chezmoi apply, etc.) callsapm installto deploy files into the right places from the pinned lockfileToday step 3 is impossible without dirtying the working tree with deployed targets the user doesn't want under version control.
The npm analogue would be
npm install --package-lock-only: resolve, write lockfile, touch nothing else.Why
The underlying principle is separating dependency resolution from deployment side effects — a fundamental composability property other package managers already provide.
Current behaviour
apm install --dry-runapm installapm install --lockfile-only(proposed)There is no mode in the middle.
--dry-runshort-circuits before persisting anything (src/apm_cli/install/pipeline.py); regular install runs the integration phase unconditionally after the lockfile phase.Proposed surface (open for discussion)
Two reasonable shapes — please flag preference:
A. Flag on
apm install—apm install --lockfile-onlynpm install --package-lock-onlymental modelB. Subcommand —
apm lockcargo generate-lockfile,pnpm lockapm lock --update,apm lock --check, etc.Implementation either way is small: skip the integration phase when the new mode is active, keep the lockfile phase. Idempotency, exit codes, and
--no-policy/--no-cacheflags would behave identically to today'sapm install.Acceptance criteria
--lockfile-onlyflag vsapm locksubcommand (UX call)apm.lock.yamlis written deterministically and matches whatapm installwould have produced.github/,.cursor/,.opencode/, etc.) are modified--dry-run,--verbose,--no-policy, scope flags continue to workapm installfrom the same lockfile on a different machine and confirm paritycli-commands.md+ apm-guidecommands.mdupdated[Unreleased]Use case from @ReoHakase (context)
— comment on #898
Related
apm install --root <dir>to target a directory other than $PWD #888 (--root <dir>) — controls where targets go; this issue controls whether targets are written at all. Composable.