Eu descobri que o Homebrew também instala as ferramentas de linha de comando do Xcode .
O grande benefício para mim é que posso fazê-lo a partir de um terminal (até mesmo ssh) e o instalador não mostra uma UI-Pop-Window , o que me impede de usar o terminal remoto.
Testado com Homebrew versão 2.1.10 (git revision b7d38f; last commit 2019-08-12).
Para mim, essas etapas foram muito mais fáceis, baixando o pacote dmg da apple e copie-o pelo ssh para a máquina de destino.
O comando do instalador irá gerar (copiado do site)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
a seguinte saída:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Homebrew
/usr/local/Frameworks
==> The Xcode Command Line Tools will be installed.
e
...
Downloading Command Line Tools (macOS Mojave version 10.14) for Xcode
Downloaded Command Line Tools (macOS Mojave version 10.14) for Xcode
Installing Command Line Tools (macOS Mojave version 10.14) for Xcode
Done with Command Line Tools (macOS Mojave version 10.14) for Xcode
...