Terminal
On this page
Short Leash puts the right PHP, Composer and its own leash command in your terminal, so the PHP you run by hand is the one your site runs.
For a shell inside Short Leash, already in the project with the site's runtimes first on the PATH, open the site's Terminals page; see Site terminals.
leash php and leash composer
leash php runs PHP for the current folder: the site's PHP version, with Short Leash's settings, dumps and Xdebug. Use it anywhere, with no setup:
leash php artisan migrate
leash php -v
leash composer install
leash node, leash npm and leash npx
leash node, leash npm and leash npx run with the current folder's Node: the site's version, installed if it isn't yet, with the site's runtimes first on the PATH and LEASH_SITE set. Outside a site they use the default Node from the Runtimes screen. See Node.
leash npm install
leash npm run dev
leash npx vite build
php, composer and leash on your PATH
In Settings › Terminal, the switch Use Short Leash's php and composer in new terminal windows adds a short block to ~/.zshrc that puts Short Leash's bin folder first on your PATH. Then plain php, composer and leash work in new terminal windows, and php uses the version for the folder you're in.
The block is marked “Short Leash”; turning the switch off removes it. If another line in ~/.zshrc still puts a different php first, Settings says so.
If another tool also puts its own php on your PATH, whichever comes later in ~/.zshrc wins. which php shows which one you're using; Short Leash's is in ~/Library/Application Support/Short Leash/bin.
Laravel installer
Settings › Terminal can also install the laravel command into Short Leash's Composer home, so laravel new works in your terminal. To create a site that's set up for Short Leash, use New Laravel site.