1

I know how to add npm and gulp startup tasks in PhpStorm, but I can't figure out how to run simple terminal commands.

Is thee a way to just add any terminal command as a startup task in PhpStorm?

Christoffer
  • 7,470
  • 9
  • 39
  • 55
  • 3
    Once check this link for some [help](https://www.jetbrains.com/help/phpstorm/settings-tools-startup-tasks.html). One SO [answer](https://stackoverflow.com/questions/27945062/can-i-automatically-run-a-terminal-command-when-opening-a-phpstorm-project) is also there. One [more](https://stackoverflow.com/questions/37587559/phpstorm-startup-task-php-artisan-serve) – Rahul May 03 '19 at 06:34
  • One of those actually do solve my specific problem. But I still can't run terminal commands. Just php scripts. – Christoffer May 03 '19 at 06:38
  • 2
    Check last answer of [this](https://stackoverflow.com/questions/37587559/phpstorm-startup-task-php-artisan-serve). But your question is php command specific, why other commands, is it hidden question? – Rahul May 03 '19 at 06:39
  • @RahulMeshram Yes, that's a point, I removed my specific php need and left the question in there. It's about running terminal commands – Christoffer May 03 '19 at 06:43
  • 1
    I think, PHPStorm won't provide full fledged terminal functionality as its IDE, build for some purpose, but you can see list of commands it supports [here](https://www.jetbrains.com/help/phpstorm/run-debug-configurations-dialog.html). Hope whatever you are searching for will be there. – Rahul May 03 '19 at 06:46
  • 2
    There are plugins that support CMD and bash files. They can create custom Run Configurations (their specific type; Not super sure about Cmd one but the one for Bash definitely can do that) .. which you may use as your startup task (you would need to create a .cmd/.bash file). If that's not good you may re-use some existing functionality (e.g. if you use `npm/gulp/grunt` in your project, create specific task that would execute your desired commands). Another option is to use External Tools functionality ... but it's not that ideal as AFAIK External Tools are IDE-wide thing and not per project. – LazyOne May 03 '19 at 10:45

0 Answers0