A while ago I was looking for a way to build the MMDVM firmware on a bare Debian Jessie system running on a Raspberry Pi. It has no X installed and thus I need a way to build the Arduino Due firmware without installing tons of GUI packages. I copied parts of a Makefile for the Arduino IDE as it is just executing command line binaries under the hood.
I added some support for building the MMDVM firmware using a Makefile to the github project a while ago. The only problem left was finding a way to “install” the Arduino IDE in command line mode.