Running Tool Commands
You can run commands, analyze and export their output right in PhpStorm using the Command Line Tools Console tool window. The character set to be used in the tool window is chosen from the Console encoding drop-down list on the Command Line Tool Support page of the Settings/Preferences dialog box.
On this page:
- Running a command
- Exporting the output
- Running a command line tool automatically after committing changes
Running a command
- On the main menu, choose Tools | Run Command. The pane opens as as a pop-up window or as a text box at the bottom of the Command Line Tools Console tool window.
- In the Input pane, type the call of the command in the format
<tool alias> <command>.
If you are using a tool from PhpStorm for the first time, create an initial tool project by running the tool-specific project generation command. The initial project is stored in the PhpStorm project root.
- View the result of command execution in the output tab named after the last invoked command.
- To terminate a command, click on the toolbar. If the Output tab is already closed, kill the current thread from the progress bar.
Exporting the output
- Click on the toolbar or press Alt+O.
- In the Export Preview dialog that opens, do one of the following:
- To save the output in a text file, specify the target text file in the Export to file text box and click Save. If the file with this name and location already exists, choose to overwrite its contents with the new data or to append the new data to the existing file.
- To copy the output to the clipboard, click Copy.