PHP Command Line Tools
PhpStorm supports running commands of popular third-party or user-defined PHP tools: Symfony 1.1+, Symfony2, Zend Framework 1, Zend Framework 2 (ZFTool), Yii, Composer, Drush 5.8+, Laravel and Doctrine (Symfony console-based), WordPress Command Line Interface.
Integrating an external PHP command line tool with PhpStorm
Download and install the tool.
Choose the tool type and visibility. In the Settings/Preferences dialog (Ctrl+Alt+S), go to .
Click on the toolbar and in the Command Line Tools dialog choose the name of the tool from the list. In the Visibility area, specify whether you want to use the tool in the current project or globally, in any PhpStorm project, and click OK.
In the Alias text box, accept the default alias to use in calls of tool commands or edit it, if necessary.
Optionally customize the command set as described in Customizing a tool.
Run a command
On the main menu, choose Input pane opens as as a pop-up window or as a field at the bottom of the Command Line Tools Console tool window.. The
Type the call of the command in the
<tool alias> <command>format.
The command execution result is displayed in the Output tab with the name of the command.
Save the command output
Click on the Output tab toolbar.
In the Export Preview dialog that opens, specify the text file to store the output in or click Copy to save the output to the clipboard.
Terminate a command
Click on the toolbar. If the Output tab is already closed, kill the current thread from the progress bar.
Customizing a tool
Open the tool definition file. On the Command Line Tool Support page, select the tool in the list and click on the toolbar. The
.xmltool descriptor opens in the editor.
Update the definitions of the commands. As you type,
.xmltool descriptor is checked for well-formedness on the fly.
Reload the command definitions. On the Command Line Tool Support page, select the tool in the list and click on the toolbar.
Defining your own command line tools
Create a tool definition file.
Create a custom PhpStorm tool. Open the Command Line Tool Support page ( for Windows and Linux or for macOS). Click on the toolbar and in the Command Line Tools dialog box that opens, select Custom tool from the Choose tool list, and specify the visibility level for it (Project or Global).
Specify the tool definition file and alias. In the Tool Settings dialog, type the path to the tool definition file, the tool alias, and provide a brief description of the tool. When you click OK, PhpStorm brings you to the Command Line Tool Support page, where the new tool is added to the list.
Choose where to show the Input pane. See Choose the Input pane location above.
Open the tool definition file. Select the newly created tool and click . The tool definition
.xmlfile opens in the editor.
Define the tool commands.
Keeping a tool descriptor consistent
Option 1: On-the-fly validation
Every time you edit a command definition in the xml tool descriptor, PhpStorm checks it for well-formedness on the fly.
Option 2: Full validation
To run full validation
Open the Input pane On the main menu, choose Input pane opens as as a pop-up window or as a field at the bottom of the Command Line Tools Console tool window.. The
- Invoke validation Type the call of a command and in the Tool definition file errors tab, analyze the notifications on detected structure inconsistencies. Each notification shows a brief description of the problem, the file and the line number where the problem is detected.
By default, the tab is hidden and opens when you click More in the Command Line Tool pop-up window with an error notification. To close the tab, click the cross on its header. To re-open it, click More once again.
Custom Tools Command Definitions
The following table provides the list of custom command line tools provided by third-party developers.