When it comes to Twitter, there are three ways to use it: the web interface, a desktop/mobile client, or tweet from the command line (for the real Indiana Jones). The last way, despite its apparent complexity, can become very useful for people who want to reach a higher level of control over their favorite micro-blogging system. If you want to use some scripts, send your tweets automatically, or just get rid of the graphical application, TTYtter is an excellent program to start with.

Installation

The installation of TTYtter is the hardest part of the process. There are no packages released yet so the best way is to download the installation script on the official website. You will also need curl installed on your machine. On Ubuntu, use the following command to install curl.

Then, you will have to rename the downloaded script to “ttytter” and make it executable. And if you like “traditional” installations, you may want to move the script to /usr/bin/. So, to sum up, you can do something like

Lastly, you can start the program by typing in your terminal:

The next step is the authentication. As you maybe know, twitter requires something called OAuth. This is why the curl package and Perl 5.8.6 or higher are needed. Start by launching TTYtter. Press Enter once, and you should see a text like that:

Follow the link given in point 1. Fill in your username, password, and grant permission to the application. It will then return a pin which you have to copy and go back to the console to paste into TTYtter. Once this is done, TTYtter will be able to fetch data from your account and display them in the terminal.

Note that sometimes you will not be able to log into twitter. You may want to check that your clock is correct, and it would be better to use NTP sync for more accuracy.

Basics

Now that the setup is done, the program should display the recent tweets from your timeline. You will notice that each tweet is of the form

This strange format will help you execute the basic actions expected from a normal twitter client.

1. Tweeting

The simplest of all, just type what you want and it will be posted.

2. Refreshing

In order to display the new tweets, you can use the command

or simply

However, this will only display the unread tweets. If you want to see again the old ones, type

3. Replying

To reply to a tweet, use the command

where code is the same used to identify the tweet in the terminal.

Notice that using just

will display the list of tweets which mentions you.

4. Re-tweeting

It’s even simpler than for replying:

5. Searching

You can perform a basic search on twitter using

Conclusion

What do you think of TTYtter? Are you seduced by the clean, simple, yet advanced functionality? Or do you prefer to stick to the GUI? Please let us know in the comments.

Adrien is a young but passionate Linux aficionado. Command line, encryption, obscure distributions… you name it, he tried it. Always improving his system, he encountered multiple tricks and hacks and is ready to share them. Best things in the world? Math, computers and peanut butter!

Our latest tutorials delivered straight to your inbox