Linux command
valet 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install Valet
valet install
Register current directory for all sites
valet park
Link current directory as site
valet link [site-name]
Serve site over HTTPS
valet secure [site-name]
Share site publicly via ngrok
valet share
Switch PHP version globally
valet use php@[8.2]
Isolate site to specific PHP version
valet isolate php@[7.4]
说明
valet is Laravel's minimalist development environment for macOS. It configures your Mac to run Nginx in the background, using DnsMasq to proxy all requests on the *.test domain to local sites. Valet provides a lightweight alternative to full VM or container-based stacks. It uses minimal resources while enabling instant site access at project-name.test URLs. The park command registers an entire directory, automatically serving each subdirectory as its own site. Sites can be served over HTTPS with automatic certificate generation, shared publicly via tunneling services, and configured with different PHP versions per-project.
FAQ
What is the valet command used for?
valet is Laravel's minimalist development environment for macOS. It configures your Mac to run Nginx in the background, using DnsMasq to proxy all requests on the *.test domain to local sites. Valet provides a lightweight alternative to full VM or container-based stacks. It uses minimal resources while enabling instant site access at project-name.test URLs. The park command registers an entire directory, automatically serving each subdirectory as its own site. Sites can be served over HTTPS with automatic certificate generation, shared publicly via tunneling services, and configured with different PHP versions per-project.
How do I run a basic valet example?
Run `valet install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more valet examples?
This page includes 7 examples for valet, plus related commands for nearby Linux tasks.