The coding group was arch-only, so the Mac could not join it: the shared groups describe packages by Arch name and a brew host draws nothing from them. Adding the brew section makes coding the first genuinely cross-platform shared group, and Laugh-Tale now takes emacs, ghostty, zed and uv from it. Those four leave the host baseline in the same commit -- left in both, metapac warns about the duplicate, and the baseline is a holding pen rather than a destination. Claude Code is the one package that cannot come from brew here. The cask ships 2.1.236 against the native installer's 2.1.248, both claim `claude` on PATH, and the native copy updates itself, so adopting the cask means a downgrade plus two updaters fighting over one binary. Arch has a real distro package and no such conflict, so coding.toml keeps declaring it there and a darwin-only chezmoi script covers macOS. The script gates on the binary being absent, not on a hostname, so a new Mac needs no entry anywhere to get it. Verified: `chezmoi apply` scoped to ~/.config/metapac renders coding into this host's group list; `metapac unmanaged` reports no unmanaged packages and no duplicate warnings; `metapac sync` installed t3-code 0.0.35 and left the four moved packages in place. The script renders with its shebang first on darwin, renders to zero bytes elsewhere, exits 0 silently when claude is present, and reaches the installer when it is not. Claude-Session: https://claude.ai/code/session_01BvpSVPsLrUK4N53LVTofR8
19 lines
602 B
Go Template
19 lines
602 B
Go Template
{{ if eq .chezmoi.os "darwin" -}}
|
|
#!/bin/sh
|
|
# Install Claude Code on macOS, where no package manager owns it.
|
|
#
|
|
# It is deliberately not a brew cask. The official installer keeps
|
|
# ~/.local/share/claude/versions/ current on its own
|
|
#
|
|
# Gated on the binary rather than the hostname, so a new Mac needs no entry
|
|
# anywhere. Reruns only when this file changes; rename to `run_` if you want
|
|
# every apply to re-check.
|
|
set -eu
|
|
|
|
if command -v claude >/dev/null 2>&1; then
|
|
exit 0
|
|
fi
|
|
|
|
# Piped to bash on purpose -- the installer uses [[ ]] and =~.
|
|
curl -fsSL https://claude.ai/install.sh | bash
|
|
{{ end -}}
|