This script allows you to use the CLI of JetBrains IDEs for Windows via WSL.
- IDE installed via JetBrains Toolbox
- PHP >= 7.1
- Open JetBrains Toolbox
- Go to Settings
- Enable "Tools" > "Generate shell scripts" and select a location for the generated shell scripts, e.g.
C:\jetbrains-shell-scripts\
- Check, if shell script for IDE was generated (e.g.
C:\jetbrains-shell-scripts\PhpStorm.cmd
) - Clone this repository, e.g. to
/home/ubuntu/jetbrains-wsl-cli-adapter/
- Create alias (e.g. in
~/.bashrc
):alias phpstorm='php /home/ubuntu/jetbrains-wsl-cli-adapter/jetbrains-wsl-cli-adapter.php "C:\jetbrains-shell-scripts\PhpStorm.cmd"'
- Re-source your file containing the alias (e.g.
source ~/.bashrc
)
You should be able to use IDE CLI from WSL shell. For example in this repository: phpstorm README.md
should open the README.md in PhpStorm.