> ## Documentation Index
> Fetch the complete documentation index at: https://herd.laravel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Command Line

# 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.

## Git Bash

If you want to use the Herd binaries in Git Bash, add these aliases to your `.bash_profile`:

```bash theme={null}
alias php="php.bat"
alias herd="herd.bat"
alias laravel="laravel.bat"
alias composer="composer.bat"
```

## Site Management

### herd park

Park a directory so that all its subdirectories become available as `.test` sites.

```powershell theme={null}
herd park
herd park C:\Users\you\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.

```powershell theme={null}
herd forget
herd forget C:\Users\you\Code
```

### herd link

Register a site outside of a parked path. Supports linking multiple domains to a single application.

```powershell theme={null}
# 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
```

### herd links

Display all linked sites.

### herd unlink

Remove the configuration for a linked site.

```powershell theme={null}
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.

```powershell theme={null}
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.

```powershell theme={null}
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.

```powershell theme={null}
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.

```powershell theme={null}
herd ini
herd ini 8.0
```

### herd php:list

List all PHP versions and their installation status.

```powershell theme={null}
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.

```powershell theme={null}
herd php:install 8.3
```

### herd php:update

Update a PHP version to the latest patch release.

```powershell theme={null}
herd php:update 8.4
```

## 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.

```powershell theme={null}
herd proxy my-app http://localhost:8080
```

### herd unproxy

Remove an Nginx proxy configuration.

```powershell theme={null}
herd unproxy my-app
```

### herd proxies

Display all configured proxy sites.

## Services (Herd Pro) {"\u2728"}

Herd Pro users can manage services like MySQL, PostgreSQL, Redis, and more entirely from the CLI. See [Services](/windows/herd-pro-services/services) for more details.

### herd services:list

List all installed service instances and their current status.

```powershell theme={null}
herd services:list
```

### herd services:available

List all available service types that can be created.

```powershell theme={null}
herd services:available
```

### herd services:versions

List all available versions for a service type.

```powershell theme={null}
herd services:versions mysql
```

### herd services:create

Create a new service instance.

```powershell theme={null}
herd services:create mysql
```

### herd services:start

Start a service instance.

```powershell theme={null}
herd services:start mysql
```

### herd services:stop

Stop a service instance.

```powershell theme={null}
herd services:stop mysql
```

### herd services:clone

Clone an existing service instance including its data and configuration.

```powershell theme={null}
herd services:clone mysql
```

### herd services:delete

Delete a service and all its data.

```powershell theme={null}
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.

```powershell theme={null}
herd log
herd log nginx
```

### herd tinker

Start a Tinker session with your Laravel application. If Herd detects [Tinkerwell](https://tinkerwell.app) on your machine, it automatically opens the application in Tinkerwell.

## Sharing

### herd share

Share a local application via an [Expose](https://expose.dev) 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.

```powershell theme={null}
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 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.
