This repository hosts the install script served at:
https://php.gt/install
The installer sets up a gt command on Linux/macOS shells using either native PHP+Composer or Docker.
Quick install:
curl https://php.gt/install | sh
Verbose output:
curl https://php.gt/install | sh -s -- --verbose
Force shell profile selection:
curl https://php.gt/install | sh -s -- --shell bash
The gt functionality is implemented in phpgt/GtCommand and installed as Composer package phpgt/gtcommand.
- Preflight checks run first (before prompts):
- Native requirements:
php >= 8.4,curl, and either archive support (unzip/7z/PHPzip) orgit. - Docker availability (
dockercommand).
- Native requirements:
- If neither native nor Docker is viable, the installer explains missing requirements, suggests package-manager install commands, and links to:
https://php.gt/docs/installer/environments
- If both paths are viable, user chooses
nativeordocker. If only one is viable, it is selected automatically. - Installer asks which shell profile to update (
bash,zsh,sh), defaulting from:--shelloverride, then parent-process inference, then$SHELL.
- Native path:
- Uses existing
composerif present, otherwise downloadscomposer-stable.phar. - Installs
phpgt/gtcommandwith Composer global require.
- Uses existing
- Docker path:
- Uses
composer:2container with mounted Composer home. - Installs
phpgt/gtcommandin that mounted Composer home.
- Uses
- In both paths, installer creates a real executable launcher named
gtin a writable bin dir:- prefers
/usr/local/bin, fallback~/.local/bin(or/tmp/.local/bin).
- prefers
- If launcher/composer directories are not on
PATH, installer offers to append exports to the selected shell rc file.
- Default mode is quiet (suppresses noisy command output) and shows simple progress feedback for long steps.
- Use
--verbosefor full command logs. gtstays updatable via Composer (phpgt/gtcommand), while the installedgtlauncher remains a stable entrypoint.