Pin apm per repo with uv and drop reliance on the global pipx install #499

Open
opened 2026-12-01 21:02:38 +00:00 by Claude · 0 comments
Owner

Why

This repo consumes holocron plugins (git, mattpocock, plan) through apm. Its apm.lock.yaml is lockfile_version: '4', written by apm 0.38.1. The dev machine's only apm is a machine-wide pipx install (/root/.local/bin/apm) at 0.28.0. According to apm's CHANGELOG, 0.36.1 and older refuse v4 locks, so apm install/audit here probably fails with the global binary. This has not been tested live.

Upgrading the global binary is not a fix either:

  • ansible (Defame1297/ansible-homelab-mono) still needs the global 0.28.0;
  • per the CHANGELOG, a lock rewritten by 0.39.2 or later is refused by 0.37.0–0.39.1, which would break any machine still on 0.38.1.

Mortis/Holocron#265 moves holocron to apm >=0.39.2 pinned per repo through uv. Defame1297/ansible-homelab-mono#1078 does the same for ansible.

apm older than 0.39.0 also drops disable-model-invocation from deployed Claude commands (Mortis/Holocron#245). The /plan and /ship commands this repo gets from plugins/plan are therefore model-invokable when deployed with 0.38.1 too.

Proposal

Follow the pattern decided in Mortis/Holocron#265 (and its ADR):

  • a pyproject.toml with apm-cli==<version> as a dev dependency and a committed uv.lock (uv is at /usr/local/bin/uv);
  • run apm as uv run apm;
  • match holocron's version (>=0.39.2) unless there is a reason not to.

Every machine that runs apm in this repo then uses the pinned version, so the 0.38.1 vs 0.39.2 lock conflict goes away.

apm approve writes the executables.allow entry into apm.yml. Re-check that this entry still matches after the version change.

Global pipx apm removal

The global pipx apm stays installed until both ansible (#1078) and kamino (this issue) are on their own pins. Whichever of the two lands last uninstalls it with pipx uninstall apm-cli.

Acceptance criteria

  • apm is pinned in this repo via uv (pyproject.toml + uv.lock) at >=0.39.2.
  • uv run apm install succeeds. The regenerated apm.lock.yaml and any executables.allow changes in apm.yml are committed.
  • Deployed .claude/commands/plan.md and ship.md carry disable-model-invocation: true.
  • README or setup docs say to run apm via uv run apm.
  • With the global pipx apm off PATH, uv run apm install and uv run apm audit still work.
  • If Defame1297/ansible-homelab-mono#1078 is already closed when this issue closes, the global pipx apm is uninstalled (pipx uninstall apm-cli) and command -v apm finds nothing. Otherwise leave it in place; #1078 removes it.

Depends on Mortis/Holocron#265.

## Why This repo consumes holocron plugins (git, mattpocock, plan) through apm. Its `apm.lock.yaml` is `lockfile_version: '4'`, written by apm 0.38.1. The dev machine's only apm is a machine-wide pipx install (`/root/.local/bin/apm`) at 0.28.0. According to apm's CHANGELOG, 0.36.1 and older refuse v4 locks, so `apm install`/`audit` here probably fails with the global binary. This has not been tested live. Upgrading the global binary is not a fix either: - `ansible` (Defame1297/ansible-homelab-mono) still needs the global 0.28.0; - per the CHANGELOG, a lock rewritten by 0.39.2 or later is refused by 0.37.0–0.39.1, which would break any machine still on 0.38.1. Mortis/Holocron#265 moves holocron to apm >=0.39.2 pinned per repo through `uv`. Defame1297/ansible-homelab-mono#1078 does the same for ansible. apm older than 0.39.0 also drops `disable-model-invocation` from deployed Claude commands (Mortis/Holocron#245). The `/plan` and `/ship` commands this repo gets from `plugins/plan` are therefore model-invokable when deployed with 0.38.1 too. ## Proposal Follow the pattern decided in Mortis/Holocron#265 (and its ADR): - a `pyproject.toml` with `apm-cli==<version>` as a dev dependency and a committed `uv.lock` (`uv` is at `/usr/local/bin/uv`); - run apm as `uv run apm`; - match holocron's version (>=0.39.2) unless there is a reason not to. Every machine that runs apm in this repo then uses the pinned version, so the 0.38.1 vs 0.39.2 lock conflict goes away. `apm approve` writes the `executables.allow` entry into `apm.yml`. Re-check that this entry still matches after the version change. ## Global pipx apm removal The global pipx apm stays installed until both ansible (#1078) and kamino (this issue) are on their own pins. Whichever of the two lands last uninstalls it with `pipx uninstall apm-cli`. ## Acceptance criteria - [ ] apm is pinned in this repo via `uv` (`pyproject.toml` + `uv.lock`) at >=0.39.2. - [ ] `uv run apm install` succeeds. The regenerated `apm.lock.yaml` and any `executables.allow` changes in `apm.yml` are committed. - [ ] Deployed `.claude/commands/plan.md` and `ship.md` carry `disable-model-invocation: true`. - [ ] README or setup docs say to run apm via `uv run apm`. - [ ] With the global pipx `apm` off PATH, `uv run apm install` and `uv run apm audit` still work. - [ ] If Defame1297/ansible-homelab-mono#1078 is already closed when this issue closes, the global pipx apm is uninstalled (`pipx uninstall apm-cli`) and `command -v apm` finds nothing. Otherwise leave it in place; #1078 removes it. Depends on Mortis/Holocron#265.
Claude added the Kind/Enhancement
Priority
Medium
3
Status
Needs Triage
labels 2026-12-01 21:02:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#499