Laravel Boost has first-class support for one local runtime (Sail) and a side-path for another (WSL), both wired in by type checks and environment sniffing spread across the project. This request proposes extracting a small Runtime abstraction so Boost can treat local-dev environments uniformly, clean up a handful of conditionals, and open the door for community-contributed runtimes.
Right now the codebase is riddled with things like:
if ($sail instanceof Sail)
isRunningInsideWsl()
$this->config->usesSail
GuidelineConfig::$usesSail
InstallCommand::shouldConfigureSail()
Every new runtime currently costs a copy of all of this. That's both a maintenance tax and a barrier to supporting setups you don't want to own directly.
Proposal
Introduce Laravel\Boost\Install\Runtime\Runtime as a small contract:
interface Runtime
{
public function name(): string;
public function displayName(): string;
public function isInstalled(): bool;
public function isActive(): bool;
public function wrap(string $binary, string $command): string;
public function buildMcpCommand(string $serverName): array;
public function guidelinePath(): ?string;
}
With a RuntimeRegistry that ships with the existing runtimes as implementations and allows third-party packages to register their own.
Backwards compatibility
- Keep
GuidelineConfig::$usesSail as a computed getter for one release
- Config
sail: true reads as runtime: sail
Laravel Boost has first-class support for one local runtime (Sail) and a side-path for another (WSL), both wired in by type checks and environment sniffing spread across the project. This request proposes extracting a small
Runtimeabstraction so Boost can treat local-dev environments uniformly, clean up a handful of conditionals, and open the door for community-contributed runtimes.Right now the codebase is riddled with things like:
if ($sail instanceof Sail)isRunningInsideWsl()$this->config->usesSailGuidelineConfig::$usesSailInstallCommand::shouldConfigureSail()Every new runtime currently costs a copy of all of this. That's both a maintenance tax and a barrier to supporting setups you don't want to own directly.
Proposal
Introduce
Laravel\Boost\Install\Runtime\Runtimeas a small contract:With a
RuntimeRegistrythat ships with the existing runtimes as implementations and allows third-party packages to register their own.Backwards compatibility
GuidelineConfig::$usesSailas a computed getter for one releasesail: truereads asruntime: sail