revolution / laravel-boost-phpstorm-copilot
Laravel Boost Custom CodeEnvironment for PhpStorm with GitHub Copilot plugin
Fund package maintenance!
invokable
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/revolution/laravel-boost-phpstorm-copilot
Requires
- php: ^8.3
- illuminate/support: ^12.30
- laravel/boost: ^1.7
Requires (Dev)
- laravel/pint: ^1.25
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.6
- pestphp/pest: ^4.1
README
Requirements
- PHP >= 8.3
- Laravel >= 12.x
- Laravel Boost >= 1.7
- GitHub Copilot plugin installed in PhpStorm
Supported OS
- macOS
- Windows (Native Windows)
- Linux
Note: It also supports Laravel Sail. Before use, start it with
vendor/bin/sail up -d.
WSL (Windows Subsystem for Linux)
This package supports WSL environments where PhpStorm runs on native Windows and PHP runs in WSL. This is a common development setup that provides Windows IDE features with Linux development environment.
Note: "Remote development" running PhpStorm within WSL is not supported.
Requirements for WSL
wslupackage must be installed in WSL- Check if installed:
wslvar -v - Install if needed:
sudo apt install wslu
How it works
- Detection: Automatically detects WSL environment by checking
WSL_DISTRO_NAMEenvironment variable - Username Resolution: Uses
wslvar USERNAMEto get Windows username (WSL and Windows usernames may differ) - File Writing: Writes MCP config to Windows side via PowerShell commands
- Creates temporary file in Windows
%TEMP%directory - Uses Base64 encoding to safely transfer JSON content
- Copies to final location:
%LOCALAPPDATA%\github-copilot\intellij\mcp.json
- Creates temporary file in Windows
- Path Handling: Converts WSL paths to Windows paths for absolute command and artisan paths
Troubleshooting WSL
- Ensure
wsluis installed andwslvarcommand works - Check that PowerShell is accessible from WSL with
powershell.exe -Command "Write-Output 'test'" - Verify Windows username with
wslvar USERNAME - If MCP config file is not created, check Windows directory permissions
Alternative for WSL
If you encounter issues with WSL setup, consider using laravel-boost-copilot-cli which uses a different approach better suited for some WSL configurations.
Installation
composer require revolution/laravel-boost-phpstorm-copilot --dev
Usage
When you run the Laravel Boost installation command within your Laravel project, you'll see a PhpStorm with GitHub Copilot item added to the list. Select it to generate MCP config file. To generate .github/copilot-instructions.md, also select the boost standard GitHub Copilot.
php artisan boost:install
Important
With PhpStorm and GitHub Copilot plugin, the MCP configuration file is stored in a system-wide location. Therefore, you need to run the boost:update command to update the configuration file whenever you switch Laravel projects. The configuration file contains the absolute path to your Laravel project.
php artisan boost:update
MCP Configuration File Location by OS
- macOS, Linux:
~/.config/github-copilot/intellij/mcp.json - Windows:
%LOCALAPPDATA%\\github-copilot\\intellij\\mcp.json
License
MIT