Twitsh, a (Very Basic) Command Line Interface for Twitter
Recently, my desk was moved from my quiet little upstairs corner to a more heavily trafficked hallway. This made my monitor more visible to passers by, and rather than having people weirded out by my Twitter background, I decided to move my tweeting to a more incognito location: Terminal. And having recently given up on SVN programs and moved that operation to the command line as well, I figured that this would be Twitter’s perfect disguise.
I did a little searching around and couldn’t find anything that did exactly what I wanted (though I’m sure it exists out there), and thought it might be a fun thing to make myself. And so I embarked my shell scripting voyage.
With a ton of help from Dave Taylor’s tutorials, I’ve started work on Twitsh (I’ve been pronouncing it “twitch,” and I’ll probably change the name once something better strikes me). I’m at the point where you can do two things from the terminal - post and view your friend’s updates. More importantly, I wrote in the ability to ignore certain strings. In my case, I want to ignore “4sq,” because I don’t care where you are. Sorry.
So I’m going to post this here in case anyone else wants to use it or build off of it. I want to add in some other features like retweeting and an easier way to open links instead of copy/paste into browser, which I’ll work on at my beginner’s pace. I should note that since I’m inexperienced with shell scripting, that I may be doing things in convoluted or non-best-practice ways, so I apologize for that. But that’s why I’m sharing. If anyone stumbles across this and has advice, please send it along.
Quickly, how to use it: I’ve been keeping it in my /usr/bin directory, not sure if that is the best place for it though. If you put it somewhere else, just add it to your export PATH line in your ~/.profile file. You’ll also need to open up the file and add your Twitter username and password in. Then you can open up Terminal and do two things:
- twitsh post (or twitsh p) “message”: Posts a message.
- twitsh friends (or twitsh fr): Prints out the most recent tweets. The next time you call this, it will only display Tweets you haven’t read yet.
You can download it here.


No Comments so far
Leave a comment
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>