Use Tools | Create Command-line Launcher, then run it from the Terminal.
imported a maven project with below command:
idea pom.xml <---- This is the Command line tool provided by Intellij guys
If you use spring boot and want to open from the terminal maven project its easy.
- Open intellij
- Navigate to Tools /Command Line Launcher
- Add the default path - Just OK
- Close the IDE</