PhpStorm 2019.3 Help

Working with PhpStorm Features from Command Line

Besides working from within PhpStorm, you can perform the following actions from the command line:

To integrate PhpStorm with your shell, you need to create the command-line launcher and ensure that it is located within the search path of your shell.

Enable a command-line launcher for a standalone installation on Windows

  • Add the path to the PhpStorm bin folder to the Path environment variable (for example, C:\Program Files\JetBrains\PhpStorm\bin). After you configured the Path environment variable, you can run the PhpStorm commands.

Enable a command-line launcher for a standalone installation on Linux and macOS

  1. From the main menu, choose Tools | Create Command-line Launcher. In the Create Launcher Script dialog, provide the name and the path of the launcher or accept the suggested values.

  2. Outside of PhpStorm, add the path and the name of the launcher script to your path so that it can be invoked system-wide.

Enable a command-line launcher for PhpStorm installed via JetBrains ToolBox

If PhpStorm is installed via the JetBrains Toolbox app, the command-line launcher has to be generated in the Toolbox app. Note that this will also create launchers for all installed Jetbrains IDEs.

  1. Open the Toolbox App, click the screw nut icon for the necessary PhpStorm instance, and select Settings.

  2. On the PhpStorm Settings page that opens, click Enable... next to the Shell scripts generation is disabled field.

    Enable scripts generation in Toolbox
  3. On the Toolbox App Settings page that opens, click the Generate shell scripts toggle button. In the Shell scripts location field that appears, provide the path to the directory where the generated scripts should be stored. Note that the provided directory must be added to the system path so that the script can be invoked system-wide.

    Set scripts path in Toolbox

On the PhpStorm Settings page, the name of the created launcher script gets displayed in the Shell script name field.

Generation in Toolbox

Launch PhpStorm from the command line

  • Type the <PhpStorm> command in the command line and press Enter. <PhpStorm> is the platform-specific launcher.

Last modified: 22 January 2020