Skip to main content

Herd Command Line Interface

Herd ships with a powerful CLI that allows you to manage your entire development environment from the terminal. The CLI is also a great tool for AI coding agents that need to interact with your local development setup. You can get the full list of commands by running herd list in your terminal.

Site Management

herd park

Park a directory so that all its subdirectories become available as .test sites.
herd park
herd park ~/Code

herd parked

List all sites within parked paths.

herd forget

Remove the current working directory (or a specified directory) from Herd’s list of parked paths.
herd forget
herd forget ~/Code
Register a site outside of a parked path. Supports linking multiple domains to a single application.
# Link the current directory as some-site.test
herd link some-site
# Link the same application via some-other-domain.test
herd link some-other-domain
Display all linked sites.
+------------------+-----+------------------------------+------------------------------------+-------------+---------+
| Site             | SSL | URL                          | Path                               | PHP Version |         |
+------------------+-----+------------------------------+------------------------------------+-------------+---------+
| beyondco.de      |     | http://beyondco.de.test      | /Users/seb/Code/beyondco.de        | 8.2         | v21.3.0 |
| herd.laravel.com |     | http://herd.laravel.com.test | /Users/seb/Code/herd.laravel.com   | 8.3         | 21      |
| tinkerwell.app   |  X  | https://tinkerwell.app.test  | /Users/seb/Code/tinkerwell-site    | 8.1         | v21.3.0 |
+------------------+-----+------------------------------+------------------------------------+-------------+---------+
Remove the configuration for a linked site.
herd unlink some-site

herd sites

List all sites that Herd is currently serving.

herd paths

Display all registered paths (parked directories).

herd open

Open the site for the current (or specified) directory in your browser.

herd db

Open the database for the current or given site, if credentials are found. Herd will look at your application’s database configuration and open a database client like TablePlus.

herd edit

Open the current directory in your configured IDE.

herd site-information

Display information about the specified site. For Laravel applications, this shows the result of php artisan about, but you can replace that with a custom driver.

herd which

Display which Herd driver serves the current working directory. Useful when debugging issues with custom Herd drivers.

PHP Version Management

herd use

Change the global PHP version that Herd uses to serve all sites that don’t have an isolated version.
herd use 8.3
herd use 8.4

herd isolate

Tell Herd to use a specific PHP version for the current directory when serving sites or using the herd composer or herd php commands.
herd isolate 8.2
herd isolate 8.3 --site="site-name"

herd unisolate

Revert a site back to Herd’s global PHP version.

herd isolated

List all sites using isolated PHP versions.

herd php

Proxy PHP commands using the isolated site’s PHP executable.
herd php artisan inspire
herd php -v

herd composer

Proxy Composer commands using the isolated site’s PHP executable. We recommend setting up a shell alias so that running composer always uses herd composer and picks up the correct PHP version for your site.

herd which-php

Display which PHP binary Herd uses to serve the application at your current terminal path.

herd ini

Open the php.ini file for your current global PHP version in your configured IDE. When running this command in an isolated project path, Herd opens the php.ini for the isolated PHP version.
herd ini
herd ini 8.0

herd php:list

List all PHP versions and their installation status.
herd php:list

+---------+-----------+------------------+
| Version | Status    | Update Available |
+---------+-----------+------------------+
| 8.5     | Installed |                  |
| 8.4 *   | Installed |                  |
| 8.3     | Installed |                  |
| 8.2     | Installed |                  |
| 8.1     | Installed |                  |
| 8.0     | Installed |                  |
| 7.4     | Installed |                  |
+---------+-----------+------------------+

herd php:install

Install a PHP version.
herd php:install 8.3

herd php:update

Update a PHP version to the latest patch release.
herd php:update 8.4

Node.js Version Management

herd isolate-node

Set a specific Node.js version for the current directory. This creates an NVM config file that automatically switches the global Node version when you enter the directory.

herd unisolate-node

Remove the Node.js version isolation for the current directory.

herd isolated-node

List all sites using isolated Node.js versions.

SSL/TLS

herd secure

Generate a trusted TLS certificate for the site in the current directory.

herd unsecure

Remove the TLS certificate and the HTTPS redirect from nginx. Make sure to restart your browser session or clear your redirect cache afterwards.

herd secured

List all currently secured sites with certificate expiration dates.

Proxies

herd proxy

Create an Nginx proxy site for the specified host. Useful for services like Reverb or Docker containers.
herd proxy my-app http://localhost:8080

herd unproxy

Remove an Nginx proxy configuration.
herd unproxy my-app

herd proxies

Display all configured proxy sites.

Services (Herd Pro)

Herd Pro users can manage services like MySQL, PostgreSQL, Redis, and more entirely from the CLI. See Services for more details.

herd services:list

List all installed service instances and their current status.
herd services:list

herd services:available

List all available service types that can be created.
herd services:available

herd services:versions

List all available versions for a service type.
herd services:versions mysql

herd services:create

Create a new service instance.
herd services:create mysql

herd services:start

Start a service instance.
herd services:start mysql

herd services:stop

Stop a service instance.
herd services:stop mysql

herd services:clone

Clone an existing service instance including its data and configuration.
herd services:clone mysql

herd services:delete

Delete a service and all its data.
herd services:delete mysql

Debugging

herd debug

Proxy PHP commands with the isolated site’s PHP executable and automatically load your debug.ini. The debug.ini usually includes Xdebug, so this is how to debug artisan commands from your terminal.

herd coverage

Run PHP commands with Xdebug coverage enabled using the isolated PHP executable.

herd debug:start

Start a debug session (Herd Pro).

herd debug:stop

Stop a debug session and display the captured data (Herd Pro).

herd log

Tail log files from Herd. Without arguments, it displays all available log files. Specify a service to tail its logs.
herd log
herd log nginx

herd logs

Open the Log Viewer UI for the given site (Herd Pro).

herd tinker

Start a Tinker session with your Laravel application. If Herd detects Tinkerwell on your machine, it automatically opens the application in Tinkerwell.

Sharing

herd share

Share a local application via an Expose tunnel.

herd fetch-share-url

Get the URL to the current Expose share tunnel.

Configuration

herd loopback

Get or set the loopback address used for Herd sites.
herd loopback
herd loopback 127.0.0.1

herd directory-listing

Determine directory-listing behavior. Default is off, which means a 404 will display.

Core Services

herd start

Start all Herd services.

herd stop

Stop all Herd services — from nginx and dnsmasq to all Herd Pro services.

herd restart

Restart all Herd services.

Initialization & Tooling

herd init

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.

herd init:fresh

Initialize a fresh herd.yml manifest file.

herd laravel:update

Update the Laravel Installer to the latest version.
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.