How to open a terminal and run commands from a plugin before the creation of a new project

Answered

I'm developing a plugin for IntelliJ IDEA to streamline the initialization of new Astro projects. I've successfully implemented the module creation feature, but I'm encountering a challenge. To finalize the setup of a new Astro project, I need to programmatically open the terminal tool window within the project's directory and execute a specific command. 

Could you provide guidance or resources on how to achieve this? Specifically, I'm looking for a way to:

  1. Open the terminal tool window in IntelliJ IDEA, setting its working directory to the module's directory.
  2. Execute a command within this terminal window.

Any assistance or examples would be greatly appreciated.

0

Please sign in to leave a comment.