acquia / blt-launcher
Provides a BLT executable for your global PATH
Requires
- composer/xdebug-handler: ^1.0
- laravel-zero/phar-updater: dev-main
- webflo/drupal-finder: ^1.0
- webmozart/path-util: ^2.3
Requires (Dev)
This package is not auto-updated.
Last update: 2023-03-11 02:43:34 UTC
README
A small wrapper around BLT for your global $PATH.
Why?
BLT must be installed on a per-project basis via Composer (composer require acquia/blt
). This makes BLT available to your project by placing it at vendor/bin/blt
.
However, it is inconvenient to type vendor/bin/blt
in order to execute BLT commands. By installing the BLT launcher globally on your local machine, you can simply type blt
on the command line, and the launcher will find and execute the project specific version of BLT located in your project's vendor
directory.
Installation - Phar
-
Download latest stable release via CLI (code below) or browse to https://github.com/acquia/blt-launcher/releases/latest.
OSX:
curl -OL https://github.com/acquia/blt-launcher/releases/latest/download/blt.phar
Linux:
wget -O blt.phar https://github.com/acquia/blt-launcher/releases/latest/download/blt.phar
-
Make downloaded file executable:
chmod +x blt.phar
-
Move blt.phar to a location listed in your
$PATH
, rename toblt
:sudo mv blt.phar /usr/local/bin/blt
-
Windows users: create a blt.bat file in the same folder as blt.phar with the following lines. This gets around the problem where Windows does not know that .phar files are associated with
php
:@echo off php "%~dp0\blt.phar" %*
Update
The BLT Launcher Phar is able to self update to the latest release.
blt self-update
Alternatives
If you only have one codebase on your system (typical with VMs, Docker, etc,), you should add /path/to/vendor/bin
to your $PATH. BLT is smart enough to find the PROJECT_ROOT and DRUPAL_ROOT when it is run from the bin directory.
Xdebug compatibility
BLT Launcher, like Composer automatically disables Xdebug by default. This improves performance substantially. You may override this feature by setting an environment variable. BLT_ALLOW_XDEBUG=1 blt [command]
Credit / Kudos
Many thanks to the Drush team for their excellent Drush Launcher, upon which BLT Launcher is based.