feat(ai): introduce APM for declarative plugin/skill/MCP management#13
Open
nobv wants to merge 5 commits into
Open
feat(ai): introduce APM for declarative plugin/skill/MCP management#13nobv wants to merge 5 commits into
nobv wants to merge 5 commits into
Conversation
nobv
commented
May 20, 2026
| @@ -0,0 +1,17 @@ | |||
| name: dotfiles-apm | |||
| @@ -0,0 +1,17 @@ | |||
| name: dotfiles-apm | |||
| version: 1.0.0 | |||
Owner
Author
There was a problem hiding this comment.
version は まだ 1.0.0 じゃない
0.0.1 でいい
| # which BSD readlink under /usr/bin does not support). | ||
| # /usr/bin: APM bundles GitPython, which shells out to `git`. | ||
| # /run/current-system/sw/bin: where nix-darwin places `claude`. | ||
| home.activation.apmSync = lib.hm.dag.entryAfter [ "writeBoundary" ] '' |
Owner
Author
There was a problem hiding this comment.
# 1. switch でまず ~/.apm/apm.yml を新しい内容に
just switch
# (activation で apm install --frozen -g が走るが、新 apm.yml ↔ 古 lockfile
で必ず失敗するはず → 期待動作)
# ↑が失敗したら次へ進む。activation の失敗は ~/.apm/apm.yml 自体は更新済みなのでOK
# 2. lockfile 再生成 (mkOutOfStoreSymlink 経由で dotfiles の apm.lock.yaml に書き戻し)
apm install -g
# 3. frozen で再確認
apm install --frozen -g
# 4. 結果を共有 → git diff modules/ai/apm/apm.lock.yaml は私が確認
# 5. もう一度 just switch で activation も成功するか確認
just switch
このフローはかなり面倒なので activation しない方がいいのでは?
afed588 to
9c564cb
Compare
nobv
commented
May 20, 2026
|
|
||
| switch: | ||
| sudo darwin-rebuild switch --flake .#{{MACHINE}} | ||
| apm install --frozen -g |
Owner
Author
There was a problem hiding this comment.
ここは just apm-sync を実行すればいいのでは?
9c564cb to
7fcc482
Compare
7fcc482 to
c7f8d31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduces APM (Agent Package Manager) v0.13.0+ as a new module (
modules/ai/apm/) to declaratively manage Claude Code plugins, skills, and MCP servers across machines.Why
apm install --frozen -g) fail loud on drift, matching Nix's declarative philosophy.apm.yml+apm.lock.yamlare git-tracked and shared across macbook / macmini / work.Key changes
New module:
modules/ai/apm/default.nix— installsapmvia Homebrew (tapmicrosoft/apm), symlinksapm.yml(immutable, nix-store) andapm.lock.yaml(mkOutOfStoreSymlink, write-through).apm.yml(name: agent-config,version: 0.0.1) — declares:anthropics/skills(Anthropic official skills bundle)anthropics/claude-plugins-official/plugins/ralph-loopcurrents-dev/playwright-best-practices-skillshadcn-ui/ui/skills/shadcnvercel-labs/agent-skills/skills/react-best-practicesvercel-labs/next-skills/skills/next-best-practicesio.github.github/github-mcp-server(HTTP transport)Integration into
just switchjust switchnow runsdarwin-rebuild switchfollowed byapm install --frozen -g.just apm-updateand commit.home.activationis intentionally NOT used so APM sync is observable separately from the Nix activation.Operational tasks (
Justfile)just apm-sync— read-only sync (apm install --frozen -g)just apm-update— refresh deps and regenerate lockfile (commit the diff)just apm-outdated— show updates availablejust apm-audit— drift / integrity checkRelated cleanup
modules/ai/claude-code/settings.json: removed redundantenabledPlugins/extraKnownMarketplacesforanthropic-agent-skills(now APM-managed).claude-mem@thedotmackstays declared because its plugin cannot be installed via APM.Stophook ralph-loop registers (tracked viamkOutOfStoreSymlink).Verification
nix build .#darwinConfigurations.macbook.system --no-link— passesdarwin-rebuild switch --flake .#macbook+apm install --frozen -g— both succeed;apmreportsInstalled 6 APM dependencies and 1 MCP serverandLockfile presence verified.Rollout plan
Enabled only on
macbookin this PR.macminiandworkwill follow oncemacbookhas soaked.Open follow-ups (out of scope)
io.github.github/github-mcp-serveris remote-SSE and fails to install for Codex CLI; harmless (configured for Claude/Gemini).