Working with IntelliJ IDEA Features from Command Line
Besides working from within IntelliJ IDEA, you can perform the following actions from the command line:
- Opening Files from Command Line
- Formatting Files from Command Line
- Launching Code Inspection from Command Line
- Viewing Difference Between Files from Command Line
- Merging Files from Command Line
On Windows, we recommend adding the path to the IntelliJ IDEA executable to the Path
environment variable. Having done this, you will be able to invoke the IntelliJ IDEA commands from any directory.
On macOS and Linux, we recommend creating the command-line launcher to integrate IntelliJ IDEA with your shell. Then, you need to ensure that the created launcher script is within the search path of your shell so that it can be invoked system-wide:
- In the main menu, choose Create Launcher Script dialog, provide the name and the path of the launcher, or accept the suggested values. . In the
- Outside of IntelliJ IDEA, add the path and the name of the launcher script to your
path
.
To launch IntelliJ IDEA from the command line
Having enabled command line support, you can launch IntelliJ IDEA from the command line.
- In the command line, run the
<IntelliJ IDEA>
command, where<IntelliJ IDEA>
is the platform-specific launcher.
Last modified: 24 July 2018