+1 using makeEspArduino.mk instead of the Arduino IDE, there is also
https://github.com/sudar/Arduino-Makefile.git for AVR-based boards. I made two small local changes to make my life a lot easier (on linux, might work on OSX, don't know about Windows). First I removed the hardwired ck upload option and made it a variable so the makefile works with a variety of boards
#
# UPLOAD_BOARD choices are none|ck|wifio|nodemcu
#
UPLOAD_BOARD ?= ck
...
upload: all
$(ESP_TOOL) $(UPLOAD_VERB) -cd $(UPLOAD_BOARD) -cb $(UPLOAD_SPEED) -cp $(UPLOAD_PORT) -ca 0x00000 -cf $(MAIN_EXE)
Second is I determine the appropriate USB port dynamically:
UPLOAD_PORT ?= $(shell lastusb)
Here is the lastusb script. This is the part that is linux specific for now:
#!/bin/bash
ls -1tr /dev/ttyUSB* | tail -1
I tend to have lots of Moteinos, Arduinos, ESP8266's and STM32's all plugged in at once. Keeping track of which was associated with which USB port was a real headache until Steve Childress pointed me to a powered USB hub with switchable ports. This is the one I've been using, I'm sure there are others that work just as well
http://www.amazon.com/gp/product/B007WTHGL8 . When you want to upload to a particular device just toggle the associated switch, wait a couple of seconds for udev to do its thing and run "make upload" to upload to the most recently power cycled device. One of the biggest timesavers I've found.