Send an SMS Text Message from the Command Line
When you think of sending out text messages you probably think of the iPhone or an Android, and the command line doesn’t cross your mind, but thanks to the ever-useful curl command, you can send out a SMS text message to any phone number right from the Terminal.
Yes, curl, the same command line tool for transferring data to and from URL’s, downloading files, getting HTTP header details, and so much more, can send text messages. This is done through a POST request sent to the TextBelt service, a free outgoing SMS API. Sure there are limits, but they’re fairly generous at 75 texts per day (per IP), and you can’t send a number more than 3 texts in three minutes to prevent abuse. Aside from that, keep in mind that you’ll be charged for incoming texts at the regular SMS / texting rate from your cell provider – this does not use the iMessage service – so don’t overuse this if you don’t have an unlimited traditional texting plan.
Read more »