Repository navigation
2.1.3 — Environment snapshot
Environment snapshot: valet state
A single command to see the whole Valet environment: services, PHP versions and every served site (#11).
| Command | Description |
|---|---|
valet state |
Human-readable tables: domain, global and CLI PHP, services status and all sites (parked, linked and proxies) with type, effective PHP, SSL and path. |
valet state --json |
Machine-readable snapshot for scripts and GUIs. Runs without sudo. |
The JSON payload is versioned (schema_version: 1) and includes:
domain,port,https_portand Valethomephp: global version, CLI (path, resolvedbinary,version),fallback_binaryandinstalledversionspaths: parked directoriessites:name,domain,url,path,type(parked/linked/proxy),secure,php(effective: isolated →.valetphprc→ global),isolated_php,phprc_php,custom_nginx,proxy_hostservices: nginx, dnsmasq, each PHP-FPM in use, mysql/mariadb, redis and mailpit, withactiveastrue,falseornull(not installed)
valet state --json | jq '.sites[] | {url, php, type}'
valet state --json | jq '.services[] | select(.active == false)'This is the foundation for the upcoming desktop UI. Existing commands are unchanged.
Other changes
ServiceManager::isActive(): non-interactive service status check for systemd and SysVservice- 5 new tests
Upgrading
composer global update fernandoebert/valet-linux-plus