PhpStorm 2017.1 Help

Creating a Command Line Tool

On this page:

Introduction

The command line tools that are available from PhpStorm are listed in the Command Line Tool Support page of the Settings/Preferences dialog box. Integration with command line tools is provided at the PhpStorm level, so once configured, a tool can be used in all your PhpStorm projects. Just activate and de-activate when necessary depending on the needs of each specific project.

You can update the command definitions of a tool and have the .xml definition file validated right in the PhpStorm editor.

Note that PHP-specific command line tools work only with local PHP interpreters, see Configuring Local PHP Interpreters and Configuring Remote PHP Interpreters.

Creating and configuring a command line tool

To create and configure a command line tool

  1. Open the PhpStorm settings and click Command Line Tool Support.
  2. In the Command Line Tool Support page, click /help/img/idea/2017.1/new.png. In the Command Line Tools dialog box that opens, choose visibility level of the tool (project or global), and its type from the Choose tool drop-down list.
  3. In the dialog box that opens, specify tool name and location, and the other required parameters.

    When you click OK, PhpStorm brings you to the Command Line Tool Support page, where the new tool is added to the list of available tools.

  4. Select the newly created tool and click /help/img/idea/2017.1/edit.png. In the tool definition .xml file that opens in the editor, define the tool commands.
  5. In the Show console in area, specify where you want the Input pane for typing commands opened:
    • To have the Input pane opened in a pop-up window, choose the Pop-up option.
    • To have the Input pane opened as a text box at the bottom of the Command Line Tools Console tool window, choose the Tool window option.

Activating a configured command line tool

To activate a configured command line tool

  1. Open the PhpStorm settings, and then click Command Line Tool Support.
  2. Select the Enable check box next to to the tool name.

See Also

Last modified: 19 July 2017