Mac OS: Tweeting using cURL

Termianl-IconThe cURL function, found on most UNIX based systems, including the Mac OS, is one of the cooler functions that is also simple to use and awesomely powerful when used correctly. Check out my introduction to CURL for more information about some cool things you can do with it.

Recently I found out that it is simple and relatively easy to post new status updates to twitter through the Terminal using cURL. This opens up the doors for using Applescript, BASH or other languages to automate postings if needed.

So to send a tweet to twitter via Terminal, this can be done with only one line of code.

Let’s say your username is “”, and your password is “password” and you want to say something clever like “Look at me tweeting from my terminal!”, the following code would send a tweet to Twitter:

curl -u -d status="Look at me tweeting from my terminal!"

Thanks to the great guide at for this info!

Leave a Reply

Your email address will not be published. Required fields are marked *