IntelliJ CLI Setup

Table of contents
  1. Launch IntelliJ from CLI
    1. Create a launcher script

Launch IntelliJ from CLI

By default, IntelliJ IDEA does not provide a CLI launcher.

Create a launcher script

First add the following script to /usr/local/bin (or any other directory in your $PATH).

Give the script a name like idea or any other name you prefer.

1
2
#!/bin/zsh
open -na "IntelliJ IDEA.app" --args "$@"

Then make the script executable,

chmod 755 /usr/local/bin/idea

Now you can launch IntelliJ IDEA from the command line,

idea .

References: