Zend certified PHP/Magento developer

How do I remap Caps Lock to Ctrl from command line in MacOs?

I am writing a shell script to replicate my mac setup. I know I can remap Caps Lock to Ctrl from the system preferences GUI but is there a way of remapping from the command line?