Send Twitter Messages from the Command Line (Mac OS and Linux)

by Joey deVilla on March 22, 2007

If you’re like me and Twitter only from a computer, you’re probably annoyed with the slow load time of the Twitter site. Using IM was an option, but as of this writing, the IM system is still down.

If you’re running a Mac or Linux and have curl installed (I believe it’s installed by default on Mac OS X), you can send “tweets” — that’s what they call Twitter messages — using the command line. Open up a terminal application and enter the following, all on the same line, substituting your username, password and message where appropriate:

curl -u your-twitter-username-here:your-twitter-password-here -d status=”Your message here” http://twitter.com/statuses/update.xml

{ 3 comments… read them below or add one }

1 jerry richardson 03.22.07 at 2:23 pm

I have to think you use Quicksilver and a Mac. Have you tried the Tweet script for QS?

2 Joey deVilla 03.22.07 at 2:28 pm

I re-installed a clean copy of OS X lately and haven’t gotten around to putting Quicksilver back on. It’s just me, the command line and curl. I’ve heard of the QS Tweet script, though.

3 Jim Hugh 03.23.07 at 6:13 am

If you’ve not got curl you can do the same with wget (syntax is a tad uglier):

wget –http-user=your-twitter-username-here –http-passwd=your-twitter-password-here –post-data ’status=Your message here’ http://twitter.com/statuses/update.xml

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Wear Them to Your Annual Review

Next post: Quick, send in the clowns*