This is a Windows port of the popular Mac development environment Laravel Valet.
Laravel Valet Windows 3 is a much needed updated fork of cretueusebiu/valet-windows, with lots of improvements and new commands. This version hopes to achieve as much parity as possible with the Mac version. For command parity, please refer to the parity checker.
composer global require ycodetech/valet-windows
Warning If you're coming from cretueusebiu/valet-windows, then you need to make sure to fully uninstall it from your computer, deleting all configs, and removing from composer with
composer global remove cretueusebiu/valet-windows
, before installing this 3.0 version.
Introduction | Installation | Commands | Command Parity Checker | Deprecations and Removals | Known Issues | Xdebug Installation | Contributions
Valet is a Laravel development environment for Windows. No Vagrant, no /etc/hosts
file. You can even share your sites publicly using local tunnels. Yeah, we like it too.
Laravel Valet configures your Windows to always run Nginx in the background when your machine starts. Then, using Acrylic DNS, Valet proxies all requests on the *.test
domain (aka tld) to point to sites installed on your local machine.
This is 3.0 of Valet Windows, branded under the name Laravel Valet Windows 3, and is a much needed updated fork of cretueusebiu/valet-windows. It introduces lots of improvements, new commands, and hopes to achieve as much parity as possible with the original Mac version.
Before installation, make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80. If XAMPP or similar is installed make sure they don't have Windows services installed and change their ports.
Also make sure to open your preferred terminal (Windows Terminal, CMD, Git Bash, PowerShell, etc.) as Administrator. You can use VS Code integrated terminal, but if VS Code isn't opened as Administrator, then a bunch of User Account Control (UAC) pop ups will appear in order to give access to Valet. You can also use a non Administrator terminal without the popups, you'll just need to use Valet's sudo
command before any other Valet commands.
NOTE: Laravel Valet Windows 3 is developed and tested to run on Windows 10. In theory it should run on Windows 11 and up, but there's no guarantee. Testers and contributors are always welcome though.
If you don't have PHP installed, make sure to install it.
Download the Zip file and unzip into a directory of your choosing. The recommended directory is: C:/php/
.
You may use Thread Safe (TS), but Non-Thread Safe (NTS) is better for using PHP on the FastCGI protocol, which Valet uses.
For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).
If you don't have Composer installed, make sure to install it.
Install Valet with Composer via composer global require ycodetech/valet-windows
.
Warning If you're coming from cretueusebiu/valet-windows, then you need to make sure to fully uninstall it from your computer, deleting all configs, and removing from composer with
composer global remove cretueusebiu/valet-windows
, before installing this 3.0 version.
Install Valet by running the valet install
command, or alternatively valet sudo install
with administrator elevation. This will configure and install Valet and register Valet's daemon to launch when your system starts. Once installed, Valet will automatically start it's services.
If you're installing on Windows 10/11, you may need to manually configure Windows to use the Acrylic DNS Proxy.
Valet will automatically start its daemon each time your machine boots. There is no need to run valet start
or valet install
ever again once the initial Valet installation is complete.
For commands that are referenced as "the same as the Mac version", please refer to the official documentation on the Laravel website for more information.
install Install Valet's services and configs
Install Valet's services and configs, and auto start Valet.
[--xdebug] Optionally, install Xdebug for PHP.
$ valet install
$ valet install --xdebug
Valet installed and started successfully!
This installs all Valet services:
And it's configs in C:\Users\Username\.config\valet
.
Once complete, Valet will automatically start the services.
install
is ran again when it's already installed, Valet will ask if you want to proceed to reinstall.--xdebug
is a boolean option to optionally install Xdebug for PHP. If the option is present, it's true
, otherwise false
.
sudo [valetCommand] A sudo-like command to use Valet commands with elevated privileges.
[-o|--valetOptions] Specify Valet command options/flags.
$ valet sudo install
sudo
is a Windows equivalent of the Mac command utilty of the same name, provided by gsudo. The command allows you to pass through Valet commands to gsudo, gsudo will then elevate the command to use the highest system administrator privileges, without the need for multiple User Account Control (UAC) popups...
gsudo only requires 1 UAC popup to enable elevation (per usage), and then the passed Valet command, it's arguments, values and options will be executed as the system with no further UACs.
valetCommand
is the Valet command, plus it's argument's values that you wish to run. It is a string array separated by spaces.
$ valet sudo isolate 7.4
In the example above, isolate
is the command name and 7.4
is the argument value.
When specifying the Valet command, you can pass the valet
CLI keyword before the command as you would normally, but this is optional. If it's omitted, Valet will add it automatically. It's preferred to omit the keyword as it's cleaner.
$ valet sudo valet isolate 7.4
--valetOptions
(shortcut -o
) [optional] is the Valet options/flags for a Valet command. It is a string, but multiple options can be specified. Please see the important notes about this option.
$ valet sudo link mysitename -valetOptions=isolate//secure
$ valet sudo link mysitename -o isolate//secure
start Starts Valet's services
[service] Optionally, specify a particular service to start [acrylic, nginx, php, xdebug]
$ valet start
Valet services have been started.
$ valet start nginx
Nginx has been started.
This command is the same as the Mac version.
restart Restarts Valet's services
[service] Optionally, specify a particular service to restart [acrylic, nginx, php, xdebug]
$ valet restart
Valet services have been restarted.
$ valet restart nginx
Nginx has been restarted.
This command is the same as the Mac version.
stop Stops Valet's services
[service] Optionally, specify a particular service to stop [acrylic, nginx, php, xdebug]
$ valet stop
Valet services have been stopped.
$ valet start nginx
Nginx has been stopped.
This command is the same as the Mac version.
uninstall Uninstalls Valet's services
[--force] Optionally force uninstallation without a confirmation question
[-p|--purge-config] Optionally purge and remove all Valet configs
$ valet uninstall
Are you sure you want to proceed? yes/no
$ yes
Valet has been removed from your system.
This completely stops and uninstalls all of Valet's services.
You will also need to uninstall
Valet if you are wanting to update Valet via Composer (composer global update ycodetech/valet-windows
), just to make sure Composer can remove and update relevant files without error.
--force
is to optionally force an uninstallation without Valet asking confirmation.
$ valet uninstall --force
Valet has been removed from your system.
--purge-config
(shortcut -p
) is to optionally purge and remove all Valet's configs. This should be used if Valet is no longer required and it won't be installed again.
$ valet uninstall --purge-config
$ valet uninstall -p
Are you sure you want to proceed? yes/no
$ yes
Valet has been uninstalled from your system, and purged all configs.
php:add [path] Add PHP by specifying a path
[--xdebug] Optionally, install Xdebug
$ valet php:add "C:\php\7.4"
PHP 7.4.33 from C:\php\7.4 has been added.
C:/Program Files/php/7.4
then it must be surrounded in quotes. Otherwise valet will encounter an error.--xdebug
is a boolean option to optionally install Xdebug for the PHP being added. If the option is present, it's true
, otherwise false
.
$ valet php:add "C:\php\7.4" --xdebug
Installing Xdebug for 7.4.33...
PHP 7.4.33 from C:\php\7.4 has been added.
php:remove [phpVersion] Remove PHP by specifying it's version
[--path=] Optionally specify by path
Both the full version and the alias version works:
$ valet php:remove 7.4.33
$ valet php:remove 7.4
PHP 7.4.33 from c:\php\7.4 has been removed.
Instead of using the version number, you can specify the PHP by it's path.
$ valet php:remove --path="C:\php\7.4"
PHP 7.4.33 from c:\php\7.4 has been removed.
php:install Reinstall all PHP services from [valet php:list]
$ valet php:install
Reinstalling PHP services...
php:install
Installs the PHP CGI services for the versions listed in Valet with php:list
. If they are already installed, Valet uninstalls them first and then reinstalls them.
php:uninstall Uninstall all PHP services from [valet php:list]
$ valet php:uninstall
Uninstalling PHP services...
php:uninstall
Uninstalls the PHP CGI services for the versions listed in Valet with php:list
.
php:list List all PHP versions and services
List the PHP versions installed in Valet.
$ valet php:list
Listing PHP services...
┌─────────┬───────────────┬────────────┬──────┬─────────────┬─────────┐
| Version | Version Alias | Path | Port | xDebug Port | Default |
├─────────┼───────────────┼────────────┼──────┼─────────────┼─────────┤
| 8.1.8 | 8.1 | C:\php\8.1 | 9006 | 9106 | X |
├─────────┼───────────────┼────────────┼──────┼─────────────┼─────────┤
| 7.4.33 | 7.4 | C:\php\7.4 | 9004 | 9104 | |
└─────────┴───────────────┴────────────┴──────┴─────────────┴─────────┘
php:which Determine which PHP version the current working directory is using
[site] Optionally, specify a site
$ valet php:which
The current working directory site1 is using PHP 7.4.33 (isolated)
$ valet php:which site2
The specified site site2 is using PHP 8.1.8 (default)
xdebug:install Install Xdebug services for all PHP versions from [valet php:list]
[phpVersion] Optionally, specify one particular PHP version of Xdebug to install
xdebug:install
installs an Xdebug service for all PHP versions listed in Valet with php:list
.
$ valet xdebug:install
Installing Xdebug services...
Installed Xdebug for PHP 7.4.33, 8.1.8
Valet only installs an Xdebug PHP CGI service on a separate port to work along side the PHP CGI service, it doesn't install Xdebug itself. Please read the Xdebug Installation for further information.
You can optionally install Xdebug for one specific PHP version using the phpVersion
argument.
$ valet xdebug:install 7.4
Installing Xdebug services...
Installed Xdebug for PHP 7.4.33
xdebug:uninstall Uninstall all Xdebug services
[phpVersion] Optionally, specify one particular PHP version of Xdebug to uninstall
$ valet xdebug:uninstall
Xdebug services uninstalled.
You can optionally uninstall Xdebug for one specific PHP version using the phpVersion
argument.
$ valet xdebug:uninstall 7.4
Installing Xdebug services...
Installed Xdebug for PHP 7.4.33
use [phpVersion] Change the default PHP version used by Valet. Either specify the full version or the alias
$ valet use 8.1
Setting the default PHP version to [8.1].
Valet is now using 8.1.18.
$ valet use 8.1.8
Setting the default PHP version to [8.1.8].
Valet is now using 8.1.8.
isolate [phpVersion] Isolates the current working directory to a specific PHP version
[--site=] Optionally specify the site instead of the current working directory
--site
option for each of the sites you wish to isolate to the same PHP version.$ cd /d/sites/my_site
$ valet isolate 7.4
Isolating the current working directory...
The site [my_site] is now using 7.4.
$ valet isolate 7.4 --site=another_site
The site [another_site] is now using 7.4.
$ valet isolate 7.4 --site=site1 --site=site2 --site=site3
The site [site1] is now using 7.4.
The site [site2] is now using 7.4.
The site [site3] is now using 7.4.
This command is the same as the Mac version.
isolated List all isolated sites
$ valet isolated
┌──────────┬────────┐
| Site | PHP |
├──────────┼────────┤
| site1 | 7.4.33 |
├──────────┼────────|
| my_site | 7.4.33 |
└──────────┴────────┘
This command is the same as the Mac version.
unisolate Removes [unisolates] the current working directory
[--site=] Optionally specify the site instead of the current working directory
[--all] Optionally removes all isolated sites
$ cd /d/sites/my_site
$ valet unisolate
Unisolating the current working directory...
The site [my_site] is now using the default PHP version.
$ valet unisolate --site=my_site
The site [my_site] is now using the default PHP version.
--all
is a boolean option to optionally unisolate all the currently isolated sites. If the option is present, it's true
, otherwise false
.
$ valet unisolate --all
The site [my_site] is now using the default PHP version.
The site [site1] is now using the default PHP version.
secure Secure the current working directory with a trusted TLS certificate
[site] Optionally specify the site instead of the current working directory
Secures a site with a trusted self-signed TLS certificate and serves the site on the https
protocol.
$ cd /d/sites/site1
$ valet secure
The [site1.test] site has been secured with a fresh TLS certificate and will now be served over HTTPS.
$ valet secure site1
The [site1.test] site has been secured with a fresh TLS certificate and will now be served over HTTPS.
sudo
command.secured List all secured sites
$ valet secured
┌──────────────┐
| Site |
├──────────────┤
| site1.test |
├──────────────┤
| my_site.test |
└──────────────┘
This command is the same as the Mac version.
unsecure Unsecure the current working directory
[site] Optionally specify the site instead of the current working directory
[--all] Optionally unsecure all secured sites
Unsecures a site by removing it's TLS certificate and serves the site on the http
protocol.
$ cd /d/sites/site1
$ valet unsecure
The [site1.test] site has been unsecured and will now be served over HTTP.
$ valet secure site1
The [site1.test] site has been unsecured and will now be served over HTTP.
--all
is a boolean option to optionally unsecure all the currently secured sites. If the option is present, it's true
, otherwise false
.
$ valet unsecure --all
Unsecured all sites.
This command is the same as the Mac version.
park Registers the current working directory to automatically serve sub-directories as sites
[path] Optionally, specify a path
$ cd /d/sites
$ valet park
This directory has been registered to Valet and all sub-directories will be accessible as sites.
$ valet park d/sites
The [d/sites] directory has been registered to Valet and all sub-directories will be accessible as sites.
park
registers a directory that contains all your sites to Valet. Once the directory has been parked
, Valet will automatically serve all sub-directories as sites, accessible in the web browser. They serve in the form of http://<directory-name>.test
To view all registered directories, use the paths
command.
This command is the same as the Mac version. For more information visit the Laravel Valet docs.
parked List all the current sites within parked paths
$ valet parked
┌───────────────────────────────────────────────┐
| Site: site1 |
| Alias: |
| SSL: |
| PHP: 7.4.33 (isolated) |
| URL: http://site1.test |
| Alias URL: |
| Path: D:\_Sites\site1 |
├───────────────────────────────────────────────┤
| Site: another site |
| Alias: another_site_renamed |
| SSL: |
| PHP: 8.1.18 (default) |
| URL: http://another site.test |
| Alias URL: http://another_site_renamed.test |
| Path: D:\_Sites\another site |
└───────────────────────────────────────────────┘
unpark | forget Remove the current working directory from Valet
[path] Optionally, specify a path
To stop auto-serving sub-directories as sites, run the forget
command to forget
the directory.
unpark
is a command alias.
$ cd /d/sites
$ valet forget
$ valet unpark
This directory has been removed from Valet.
$ valet forget d/sites
$ valet unpark d/sites
The [d/sites] directory has been removed from Valet.
This command is the same as the Mac version.
link Register the current working directory as a symbolic link
[name] Optionally specify a new name to be linked as
[--secure] Optionally secure the site
[--isolate=] Optionally isolate the site to a specified PHP version
link
is another way to serve directories as sites, except it serves one singular site in a directory rather than the whole directory. It does this by creating a symbolic link inside the /.config/valet/Sites
directory, of which is a parked
directory on Valet installation.
Serving the current working directory as a site:
$ cd /d/sites/site1
$ valet link
A [site1] symbolic link has been created in [C:/Users/Username/.config/valet/Sites/site1].
If you wish to serve the site under a different name to that of the directory, just pass the optional name
argument. This is most useful if the directory has spaces in the name, Valet doesn't URL encode spaces or any other non-URL safe characters, so the site won't work without changing it.
$ cd /d/sites/my awesome site
$ valet link my_site_renamed
A [my_site_renamed] symbolic link has been created in [C:/Users/Username/.config/valet/Sites/my_site_renamed].
--secure
option allows you to secure the site. It is boolean, so if it's present it's true
, otherwise false
.
$ valet link cool_site --secure
A [cool_site] symbolic link has been created in [C:/Users/Username/.config/valet/Sites/cool_site].
The [cool_site.test] site has been secured with a fresh TLS certificate.
--isolate
option allows you to isolate the site to a specific PHP version. Pass it with a value.
$ valet link cool_Site --isolate=7.4
A [cool_site] symbolic link has been created in [C:/Users/Username/.config/valet/Sites/cool_site].
The site [cool_site.test] is now using 7.4.
This command is the same as the Mac version. For more information, please see the Laravel Valet docs.
links List all registered symbolic links
$ valet links
┌─────────────────┬─────────┬──────────────────┬─────────────────────────────┬───────────────────────────────────────┐
| Site | Secured | PHP | URL | Path |
├─────────────────┼─────────┼──────────────────┼─────────────────────────────┼───────────────────────────────────────┤
| my_site_renamed | | 8.1.18 (default) | http://my_site_renamed.code | D:\_Sites\a_completely_different_name |
├─────────────────┼─────────┼──────────────────┼─────────────────────────────┼───────────────────────────────────────┤
| cool_site | X | 7.4.33 (isolated)| http://cool_site.code | D:\_Sites\cool and awesome site |
└─────────────────┴─────────┴──────────────────┴─────────────────────────────┴───────────────────────────────────────┘
This command is the same as the Mac version.
unlink Unlink the current working directory linked site
[name] Optionally specify the linked site name
unlink
removes the current working directory's (cwd) symbolic linked site. Valet will find the linked site name using the cwd name and delete the symbolic link from the /.config/valet/Sites/
directory.
$ cd /d/sites/my site
$ valet unlink
The [cool_site] symbolic link has been removed.
name
specifies the name of the symbolic link.
$ valet unlink cool_site
The [cool_site] symbolic link has been removed.
secured
, Valet will unsecure it before removing.$ valet unlink cool_site
Unsecuring cool_site...
The [cool_site] symbolic link has been removed.
isolated
, Valet will unisolate it before removing.$ valet unlink cool_site
The site [cool_site] is now using the default PHP version.
The [cool_site] symbolic link has been removed.
This command is the same as the Mac version.
proxy [site] [host] Proxy a specified site to a specified host
[--secure] Optionally, secure with a trusted TLS certificate
proxy
allows you to proxy
a Valet site to another service on your machine and send all traffic from the Valet site to the service.
You may also proxy multiple sites to 1 host by separating them with commas.
$ valet proxy site1 http://127.0.0.1:9200
Valet will now proxy [http://site1.test] traffic to [http://127.0.0.1:9200]
$ valet proxy site1,site2,site3 https://127.0.0.1:9200
Valet will now proxy [http://site1.test] traffic to [http://127.0.0.1:9200]
Valet will now proxy [http://site2.test] traffic to [http://127.0.0.1:9200]
Valet will now proxy [http://site3.test] traffic to [http://127.0.0.1:9200]
--secure
option allows you to secure the proxy site. It is boolean, so if it's present it's true
, otherwise false
.
$ valet proxy site1 https://127.0.0.1:9200 --secure
Valet will now proxy [https://site1.test] traffic to [https://127.0.0.1:9200]
This command is the same as the Mac version.
proxies List all the proxy sites
$ valet proxies
┌───────┬─────────┬────────────────────┬────────────────────────┐
| Site | Secured | URL | Host |
├───────┼─────────┼────────────────────┼────────────────────────┤
| site1 | X | https://site1.test | https://127.0.0.1:9200 |
└───────┴─────────┴────────────────────┴────────────────────────┘
This command is the same as the Mac version.
unproxy [site] Remove a proxied site
Just like the proxy
command, you may unproxy multiple sites at once by separating them with commas.
$ valet unproxy site1
Valet will no longer proxy [http://site1.test].
$ valet unproxy site1,site2,site3
Valet will no longer proxy [http://site1.test].
Valet will no longer proxy [http://site2.test].
Valet will no longer proxy [http://site3.test].
This command is the same as the Mac version.
sites List all the parked, linked, and proxied sites
$ valet sites
┌──────────────┬────────────┬─── Parked ───────────────┬────────────────────────┐
| Site | PHP | URL | Path |
├──────────────┼────────────┼──────────────────────────┼────────────────────────┤
| site1 | 7.4.33 | https://site1.test | D:\_Sites\site1 |
| | (isolated) | | |
├──────────────┼────────────┼──────────────────────────┼────────────────────────┤
| site-test | 8.1.8 | http://site-test.test | D:\_Sites\site-test |
| | (default) | | |
├──────────────┼────────────┼──────────────────────────┼────────────────────────┤
| awesome site | 8.1.8 | http://awesome site.test | D:\_Sites\awesome site |
| | (default) | | |
└──────────────┴────────────┴──────────────────────────┴────────────────────────┘
┌──────────────┬────────────┬───────── Linked ─────────┬────────────────────────┐
| Site | PHP | URL | Path |
├──────────────┼────────────┼──────────────────────────┼────────────────────────┤
| awesome_site | 8.1.8 | http://awesome_site.test | D:\_Sites\awesome site |
| | (default) | | |
└──────────────┴────────────┴──────────────────────────┴────────────────────────┘
┌─────────┬───────────────── Proxied──┬────────────────────────┐
| Site | URL | Host |
├─────────┼───────────────────────────┼────────────────────────┤
| my_site | http://awesome_site.test | http://127.0.0.1:9200 |
└─────────┴───────────────────────────┴────────────────────────┘
share Share the current working directory site with a publically accessible URL
[site] Optionally, specify a site
[-o|--options] Optionally, specify ngrok options/flags
[--debug] Allow error messages to output to the current terminal
$ cd /d/sites/site1
$ valet share
$ valet share site1
Share your local site publically. ngrok will do all the magic for you and give you a publically accessible URL to share to clients or team members.
Before sharing a site with ngrok, you must first set the authtoken using Valet's set-ngrok-token
command.
When using the command, a new CMD terminal will be launched with the ngrok information, including the public URL to share.
fetch-share-url
command.--options
(shortcut -o
) [optional] is ngrok's options/flags for it's http
command (which valet share
uses internally). It is a string, but multiple options can be specified. Please see the important notes about this option.
$ valet share site1 --options domain=example.com//region=eu//request-header-remove="header to remove"
$ cd /d/sites/site1
$ valet share -o domain=example.com
--debug
flag to the command. This will cause ngrok to try to run in the current terminal instead of a new window, thus sending the error messages.auth | set-ngrok-token [authtoken] Set the ngrok authtoken.
auth
is a command alias.
$ valet set-ngrok-token 123abc
$ valet auth 123abc
Authtoken saved to configuration file: C:/Users/Username/.config/valet/ngrok/ngrok.yml
Before sharing a site with ngrok, you must first set the authtoken, which can be accessed in your ngrok account.
This command is the same as the Mac version.
url | fetch-share-url Get and copy the public URL of the current working directory site that is currently being shared
[site] Optionally, specify a site
url
is a command alias.
Once sharing a site with valet share
, you can get the public URL using this command in a separate terminal. The URL will be outputted to the terminal and will also be copied to the clipboard for ease of use.
$ cd /d/sites/site1
$ valet fetch-share-url
The public URL for site1 is [ngrok public URL]
It has been copied to your clipboard.
$ valet fetch-share-url site1
$ valet url site1
The public URL for site1 is [ngrok public URL]
It has been copied to your clipboard.
This command is the same as the Mac version.
ngrok [commands] Run ngrok commands
[-o|--options] Specify ngrok options/flags.
Because ngrok CLI has a multitude of commands and options, the valet ngrok
command is very useful for passing through any and all commands to ngrok.
The commands
argument is a space-separated array of the commands plus it's argument's values.
$ valet ngrok config add-authtoken 123abc
The --options
(shortcut -o
) [optional] can be used to pass options/flags to ngrok. It is a string, but multiple options can be specified. Please see the important notes about this option.
$ valet ngrok config add-authtoken 123abc --options config=C:/path/ngrok.yml//log=false
$ valet ngrok config add-authtoken 123abc -o config=C:/path/ngrok.yml//log=false
tld Get the TLD currently being used by Valet
[tld] Optionally, set a new TLD
tld
gets the current Top Level Domain (TLD) that Valet is using.
$ valet tld
test
When developing, you may like to use a different TLD. Valet serves sites on the default .test
TLD, but you can also set a different one with this command, just pass the new TLD as it's argument.
$ valet tld code
Your Valet TLD has been updated to [code].
It's important to note, when choosing a TLD, you need to be careful not to use one that could potentially be used on the Web. If your site name and TLD match a real web address, then the browser will resolve the request and redirect it to the real website instead of Valet resolving it to your local project.
Example: Your local Roots Bedrock site on bedrock.dev
will redirect to the Minecraft Bedrock website.
Generally, the special-use domains listed on Wikipedia, and any unique custom ones like .code
, are all good to use as they are invalid TLDs.
This command is the same as the Mac version.
Note: the Mac version has officially discontinued it's use; whereas Valet Windows 3 won't.
which Determine which Valet driver the current working directory is using
$ cd /d/sites/site1
$ valet which
This site is served by [BasicValetDriver].
This command is the same as the Mac version.
paths List all of the paths registered with Valet
paths
allows you to view all registered paths. The default path is .config/valet/Sites
, any others are added via the park
command.
$ valet paths
┌───────────────────────────────────────┐
│ Paths │
├───────────────────────────────────────┤
│ C:/Users/Username/.config/valet/Sites │
├───────────────────────────────────────┤
│ D:/Sites │
└───────────────────────────────────────┘
This command is the same as the Mac version.
open Open the current working directory site in the browser
[site] Optionally, specify a site
$ cd /d/sites/site1
$ valet open
$ valet open site1
This command is the same as the Mac version.
latest | on-latest-version Determine if this is the latest version/release of Valet
latest
is a command alias.
$ valet on-latest-version
$ valet latest
Yes
on-latest-version
determines whether the installed version of Valet is the latest. If not, then Valet will prompt you to update.
This command is the same as the Mac version.
log View and follow a log file
[key] The name of the log
[-l|--lines] The number of lines to view
[-f|--follow] Follow real time streaming output of the changing file
$ valet log nginx --lines=3 --follow
$ valet log nginx -l 3 -f
log
allows you to view the logs which are written by Valet's services. To view a list of logs, simply run valet log
.
$ valet log
┌───────────────────────┬───────────────────────────────────────────────────────────────┐
│ Key │ File │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ nginx │ C:/Users/Username/.config/valet/Log/nginx-error.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ nginxservice.err │ C:/Users/Username/.config/valet/Log/nginxservice.err.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ nginxservice.out │ C:/Users/Username/.config/valet/Log/nginxservice.out.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ nginxservice.wrapper │ C:/Users/Username/.config/valet/Log/nginxservice.wrapper.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ phpcgiservice.err │ C:/Users/Username/.config/valet/Log/phpcgiservice.err.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ phpcgiservice.out │ C:/Users/Username/.config/valet/Log/phpcgiservice.out.log │
├───────────────────────┼───────────────────────────────────────────────────────────────┤
│ phpcgiservice.wrapper │ C:/Users/Username/.config/valet/Log/phpcgiservice.wrapper.log │
└───────────────────────┴───────────────────────────────────────────────────────────────┘
The key
is required in order to view a log. It can be found from the list of logs.
The --lines
(shortcut -l
) option changes the number of lines to view from the log.
$ valet log nginx --lines=3
$ valet log nginx -l 3
The --follow
(shortcut -f
) option can be used to follow real time streaming output of the changing file.
$ valet log nginx --follow
$ valet log nginx -f
--follow
is set to stream output "forever" (though one can never be too sure if it actually is forever). To stop the output stream, you need to press ctrl+C
. This command is the same as the Mac version.
services List the installed Valet services
$ valet services
Checking the Valet services...
┌───────────────────┬────────────────────────────────┬───────────────┐
| Service | Windows Name | Status |
├───────────────────┼────────────────────────────────┼───────────────┤
| acrylic | AcrylicDNSProxySvc | running |
├───────────────────┼────────────────────────────────┼───────────────┤
| nginx | valet_nginx | running |
├───────────────────┼────────────────────────────────┼───────────────┤
| php 8.1.8 | valet_php8.1.8cgi-9001 | running |
├───────────────────┼────────────────────────────────┼───────────────┤
| php 7.4.33 | valet_php7.4.33cgi-9002 | running |
├───────────────────┼────────────────────────────────┼───────────────┤
| php-xdebug 8.1.8 | valet_php8.1.8cgi_xdebug-9101 | not installed |
├───────────────────┼────────────────────────────────┼───────────────┤
| php-xdebug 7.4.33 | valet_php7.4.33cgi_xdebug-9102 | running |
└───────────────────┴────────────────────────────────┴───────────────┘
directory-listing Determine directory-listing behaviour. Default is off, which means a 404 will display
[status] Optionally, switch directory listing [on, off]
$ valet directory-listing
Directory listing is off
$ valet directory-listing on
Directory listing setting is now: on
This command is the same as the Mac version.
diagnose Output diagnostics to aid in debugging Valet.
[-p|--print] Optionally print diagnostics output while running
[--plain] Optionally print and format output as plain text (aka, pretty print)
$ valet diagnose
Running diagnostics...
[Diagnostics output here]
The diagnostics will be copied to the clipboard as formatted HTML for easy issue reporting.
This command is the same as the Mac version.
parity Output the calculation of the percentage of parity completion against Laravel Valet (macOS) of a specific version.
$ valet parity
Out of a total 39 commands, 36 are possible for parity, with 34 complete, and 11 brand new commands.
Parity at 87% out of a total 92% possible parity with the Laravel Valet (macOS) v4.3.0
This command is a way to determine how much parity has been achieved.
--options
These are important notes for the commands that have the --options
or --valetOptions
.
The --options
, --valetOptions
(shortcut -o
) options can be used to pass options/flags to the service related to that command.
Just pass the option name without the --
prefix eg. --options=config=C:/path/ngrok.yml
(example for the ngrok
command). This is so that Valet doesn't get confused with it's own options.
All options/flags that are passed will be prefixed with --
after Valet has processed the command, unless it's a shortcut of a single character, then it will be prefixed with -
. The example above will run as --config=C:/path/ngrok.yml
.
The =
immediately after the command option is optional, if it's omitted, you must use a space instead.
--options=option1
--options option1
--valetOptions=option1
--valetOptions option1
The options also have -o
shortcuts and it cannot have the =
character, it must use a space for separation.
-o option1
This falls inline with Symfony's docs and complies with command-line standards.
Note that to comply with the docopt standard, long options can specify their values after a whitespace or an
=
sign (e.g.--iterations 5
or--iterations=5
), but short options can only use whitespaces or no separation at all (e.g.-i 5
or-i5
).
The options also allows multiple options to be passed, they just need to be separated with double slashes //
.
--valetOptions=option1//option2//option3
--options option1//option2//option3
-o option1//option2//option3
Commands that have been tested and made parity:
services
php:which
To see a calculation of how much parity has been achieved, see the parity command.
Deprecated | Since Version | Will be Removed in Version | Removed? | The `install` command confirmation question about uninstalling the outdated cretueusebiu package. Doesn't affect valet functionality. | 3.1.0 | 3.2.0 | ✗ |
---|