Category Archives: IntelliJ

IntelliJ 2020.3 cli command – run idea from your shell again

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.

#!/bin/bash
"/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.

IntelliJ .http/.rest cli support

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.

IntelliJ IDEA on Mac OS

When using IntelliJ IDEA with Spring Boot on a Mac make sure you have the entry

127.0.0.1 <hostname>.local

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.

IntelliJ use system proxy settings

  • Go to the IntelliJ installation folder and open the bin-directory
  • Add “-Djava.net.useSystemProxies=true” at the end of the idea64.vmoptions file (without 64 on a 32-bit system)
  • Restart IntelliJ and configure it to automatically configure proxy (Settings > Appearance & Behavior > System Settings > HTTP Proxy)