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:
- Open the terminal tool window in IntelliJ IDEA, setting its working directory to the module's directory.
- Execute a command within this terminal window.
Any assistance or examples would be greatly appreciated.
Please sign in to leave a comment.
Hi,
Please check https://intellij-support.jetbrains.com/hc/en-us/community/posts/360005329339-Execute-command-in-the-terminal-from-plugin-action