The following commands are available in the Laravel Herd CLI tool. Each command allows you to manage development environment settings and configurations directly from the command line.
You can get the full list of commands by running herd list
in your terminal.
The herd composer
command proxies composer calls to the isolated PHP version of a site. We recommend setting up an alias for your terminal so that running composer
on the command line always uses herd composer
and uses the correct PHP version for your site.
You can run herd coverage
to run PHP commands with Xdebug coverage enabled and it always uses the the isolated PHP executable.
Run herd debug
and automatically load your debug.ini
for this command. The debug.ini
usually includes Xdebug so if you want to debug artisan commands, this is how to do it from your terminal.
The herd edit
command opens the current directory in the configured IDE.
The herd ini
command automatically opens the php.ini
file for your current global PHP version in your configured IDE.
When running this command in an isolated project path, Herd will open the php.ini file for the isolated PHP version.
You may also specify which version you want to use:
If a herd.yml
file is present in the directory, Herd configures your application according to the manifest file. Without a herd.yml
, the command starts the wizard to create one.
The command tells Herd to use a specific PHP version for this directory when serving sites or using the herd composer
or herd php
commands.
Similar to the herd isolate
comand for PHP, the herd isolate-node
command sets a specific Node.js version for a directory. The difference to the PHP version of the command is that herd isolate-node
creates and NVM config file that autoamtically switches the global node version if you enter this directory – so you can’t run multiple versions in different directories in parallel.
The isolated
command lists all sites with isolated PHP versions and givey you a quick overview where they are.
Analog to the PHP command, the isolate-node
command lists all sites with isolated Node.js versions.
You can register applications outsite of a parked path via the herd link
command. It also supports linking multiple domains to a single application.
You can display all linked sites via herd links
.
You can tail any logs from Herd via the herd log
command. If you run it without an argument, it displays all available log files and if your specify a service, it tails the logs of this service.
If you’re using Herd Pro, you can open the Log Viewer via herd logs
from your terminal.
The herd open
command opens the current directory in a browser.
You can park additional directories via the herd park
command and make all subdirectories available via their .test
domains.
Type herd parked
to lists all sites in parked paths.
The herd php
command runs PHP commands using the isolated executable for the site.
You can restart all Herd services via the herd restart
command.
Generate a trusted TLS certificate by running herd secure
in the directory of am application.
Run herd secured
to list all currently secured sites with the expiration date of the certificate.
You can share local applications via the herd share
command and Expose.
The herd site-information
command displays information based on the driver of the application. For Laravel applications, this is the result of the php artisan about
command but you can replace that with a custom driver.
Start all Herd services with herd start
.
Stop all Herd services – from nginx and dnsmasq to all Herd Pro services – via herd stop
.
You can hop into a tinker session with your Laravel application via herd tinker
. If Herd detects Tinkerwell on your machine, it automatically opens the application in Tinkerwell.
If you’ve isolated the application at your current terminal path to a specific PHP version and want to use the global version again, you can run herd unisolate
to remove the isolation.
Like herd isolate
, the unisolate-node
command removes the isolation to a specific Node.js version. The command uses Herd’s nvm under the hood so make sure to have that installed first.
You can remove the configuration for a linked site by running the herd unlink
command in the linked directory.
Run herd unsecure
to remove the TLS certificate of the domain and the automated redirect to HTTPS from nginx. Make sure to restart your browser session or clear your redirect cache because your browser will still try to send you to the HTTPS URL instead of simply serving the site via HTTP.
The command herd use
changes the global PHP version that Herd uses to serve all sites that don’t have an isolated version.
In case that you are debugging issues with your custom Herd driver, you can run herd which
to see which driver Herd detects for the application at your current terminal path.
You can run herd which php
to see which PHP binary Herd uses to serve the application at your current terminal path.
Initializes a fresh Herd manifest file.
Herd also ships with the Forge CLI and you can run forge
commands like forge ssh
from any local site that you link via the Forge Integration without specifying a server.