Applescript or Terminal to Arduino

I haven't tried it, but you could give SerialPort X a try.