How can i toggle Caps Lock LED by a program Is there any way to toggle Caps Lock LED by a shell command or a script or a prgram on OSX 10.10? 

All the solutions i goggled do not work on Yosemite.

I have mapped pressing Caps Lock to toggle keyboard layouts so i wanted to use the LED as an indicator of the present keyboard layout.
MacLight is a Ruby Script which has worked for me.

https://github.com/busyloop/maclight