You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Declare which resources require Homebrew or Xcode Command Line Tools - #110
Resources now declare what they need on macOS with requires: requiresOnMacOS(...) (src/utils/requires.ts). The CLI then installs Homebrew and the Xcode Command Line Tools only when a resource in the config needs them. A config with only macos-settings, alias, file, ssh-key, docker, vscode… no longer installs the Command Line Tools.
Annotations (from a scan of every resource's macOS install path)
homebrew (installs with brew on macOS; homebrew brings in xcode-tools): asdf, cursor, github-cli, goenv, jenv, the JetBrains IDEs, webstorm, ollama, pgcli, syncthing, uv, virtualenv, codex-app, fnm, xcodes, plus git-lfs, pyenv, rbenv
action requires nothing. A script that needs the Command Line Tools declares an xcode-tools resource itself; its description says so.
Fixes found during the scan
nvm: installs with METHOD=script (curl). Before, it used git whenever command -v git succeeded, which on a fresh Mac is the /usr/bin/git stub. So nvm no longer needs the Command Line Tools.
git:
Its check no longer trusts the /usr/bin/git stub, which passes which git; it checks xcode-select -p.
When created, it skips the brew install if the Command Line Tools already provide git.
It doesn't try to uninstall the system git.
ios-simulators: needs Xcode, not the Command Line Tools. It now has a soft dependency on xcodes, and checks that the selected developer directory is Xcode.app before running xcrun, with a clear error. Its example uses xcodes.
codex-app: uses installViaPkgMgr / uninstallViaPkgMgr instead of calling brew directly.
Guard rail src/utils/requires.test.ts scans resource sources. It fails if a resource uses brew or runs git without a matching requires. Exceptions are listed for resources that only use brew when it's already installed or to remove an old install.
Depends on
feat: add requires resource setting (2.1.0) codify-plugin-core#27: the requires setting. This branch still pins @codifycli/plugin-core 2.0.0 and won't compile against it. After 2.1.0 is published, run npm i @codifycli/plugin-core@2.1.0 on this branch (it was type-checked against a local 2.1.0 build).
Summary
Resources now declare what they need on macOS with
requires: requiresOnMacOS(...)(src/utils/requires.ts). The CLI then installs Homebrew and the Xcode Command Line Tools only when a resource in the config needs them. A config with onlymacos-settings,alias,file,ssh-key,docker,vscode… no longer installs the Command Line Tools.Annotations (from a scan of every resource's macOS install path)
xcode-tools(runs git, make, a compiler or/usr/bin/python3):homebrew,git,git-repository(ies),git-lfs,asdf-plugin,asdf-install,pyenv,rbenv,rust,macports,project-install(s),venv-project,virtualenv-project,pip,pip-sync,npm,openclawhomebrew(installs with brew on macOS; homebrew brings inxcode-tools):asdf,cursor,github-cli,goenv,jenv, the JetBrains IDEs,webstorm,ollama,pgcli,syncthing,uv,virtualenv,codex-app,fnm,xcodes, plusgit-lfs,pyenv,rbenvactionrequires nothing. A script that needs the Command Line Tools declares anxcode-toolsresource itself; its description says so.Fixes found during the scan
nvm: installs withMETHOD=script(curl). Before, it used git whenevercommand -v gitsucceeded, which on a fresh Mac is the/usr/bin/gitstub. So nvm no longer needs the Command Line Tools.git:/usr/bin/gitstub, which passeswhich git; it checksxcode-select -p.ios-simulators: needs Xcode, not the Command Line Tools. It now has a soft dependency onxcodes, and checks that the selected developer directory is Xcode.app before runningxcrun, with a clear error. Its example usesxcodes.codex-app: usesinstallViaPkgMgr/uninstallViaPkgMgrinstead of calling brew directly.Guard rail
src/utils/requires.test.tsscans resource sources. It fails if a resource uses brew or runs git without a matchingrequires. Exceptions are listed for resources that only use brew when it's already installed or to remove an old install.Depends on
requiressetting. This branch still pins@codifycli/plugin-core2.0.0 and won't compile against it. After 2.1.0 is published, runnpm i @codifycli/plugin-core@2.1.0on this branch (it was type-checked against a local 2.1.0 build).Test plan
npx vitest run src(280 passed),tsc,npm run buildrequiresfor all 86 resource definitions in the initialize responsenvminstalls without a Command Line Tools dialoggitplans auto-addedxcode-toolsand doesn't call brewios-simulatorswithout Xcode.app fails with the new messagetest/codex/codex-app.test.tsGenerated by Claude Code