My latest IntelliJ installation didn’t come with a command line idea command so I wrote a short script and put it to /usr/local/bin/idea on my local machine.
"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea" $@ &
This will only work on a mac. If you’re facing the lack of the command as well you need to find the path to your idea.sh and put it in a script the same way i did and can use the same place as well. $@ just forwards all arguments you give the script to the called command and & will run it in the background – if you skip the & you will see intellij logs in your shell – so its running in the forground.
I’m a big fan of the IntelliJ .http/.rest files but only being able to run them from within the IDE was not very satisfying. So I was looking for a way to run them from the cli as well and found https://github.com/restcli/restcli. This project offers a cli tool named rest-cli that is able to run IntelliJ’s files including env files. So those can also be integrated into CI/CD or other workflows that don’t use IntelliJ.
On the release page https://github.com/restcli/restcli/releases you can find the latest version of the tool as zip or brew package. If I remember correctly I was able to install the brew package with
brew install -f brew_restcli.zip
But just downloading it and putting it into the path also works fine.
When using IntelliJ IDEA with Spring Boot on a Mac make sure you have the entry
in your /etc/hosts file. Replace <hostname> with your Mac’s name. Also make sure that the result of the command ‘hostname’ is in your /etc/hosts file as well pointing to your local address.
To get rid of *.iml files and *.idea files open File > Settings > Editor > File Types and add ;*.iml;*.idea; at the end of the Ignore files and folers input field