The command line remains so incredibly popular because it’s so incredibly versatile.
You can do a lot in a terminal. You can manage your OS, apps and files; you can connect to remote servers, watch movies, play games, fetch the weather forecast, and a whole heap more
Using the CLI can be both fun and educational.
Using Twitter through a command line interface though? Hmm…
Twitter CLI is Pretty Fun
I’ll grant you that using a Twitter CLI sounds a bit crazy, and in many ways it is.
Twitter is a visual platform these days, with avatars, embedded photos, videos, gifs, polls, those new-fangled Twitter Moments — all part-and-parcel of the microblogging service’s reason d’être.
But at it’s core Twitter is a text service — it was initially set up as an SMS-based service — and this means it “just works” when viewed through a text-based tool like a terminal emulator.
Using Twitter in a terminal window can be a great way to harness the value of the tool in a work or study environment, but without distraction of auto-playing gifs and lurid celebrity selfies.
In a way, Twitter terminal apps allow you zone in on the content of tweets rather than the window dressing that accompanies them; a way to keep Twitter in focus without you losing focus, if you will.
Several Twitter CLI Apps Exist
There are numerous different command line Twitter clients available for Windows, macOS and Linux.
Our favourite is the open-source Python-based Rainbow Stream. It strikes the best balance between looking good and working good, and supports almost every feature you’ll need.
While Rainbow Stream is available for Windows and Mac we are only focusing on how it works on Linux, specifically Ubuntu.
Rainbow Stream: Twitter CLI
Rainbow Stream is colourful, well structured and can do just about everything that a desktop twitter app or web-based client can.
You can see the most recent tweets from those you follow, and like, retweet or quote-retweet if you need to; you can post your own status updates, send and read direct messages, and even follow, unfollow or block people!
And just because you can’t see images (by default) doesn’t mean you can’t post them as, yup, Rainbow Stream supports picture uploads.
We could wax lyrical all-night about its many, many features but the official website and documentation available on its GitHub page do an ample job of explaining.
Install Rainbow Stream on Ubuntu 16.04+
Open a new Terminal window and run the following command to install Rainbow Stream using the python package management system:
sudo pip3 install rainbowstream
If you get an error running this it’s because pip3 isn’t installed. You’ll need to install it first:
sudo apt install python3-pip
Now re-run the command above.
The python pip will take care of installing most of what you need, but should you encounter any issues about missing dependencies you can run:
sudo apt-get install libsqlite3-dev libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
Assuming all goes well you can launch the app by running the following command:
The first time you run Rainbow Stream you will be guided through adding a (valid) Twitter account.
The Twitter authentication page will open in a new tab in your default browser. You’ll need to login with the Twitter account you wish to use in Rainbow Stream, authorise the app, and then type the access PIN you see in your browser back in the terminal.
Once successfully authorised you’re in!
Rainbow Stream: Helpful Commands
There is a giddying array of commands you can run, but some of the most useful commands you’ll be wanting to use follow.
At any time you can type
h and hit enter to view the built-in help documentation.
To tweet type
t followed by the content of your tweet, e.g:
t I'm tweeting from #Rainbowstream, an ace CLI #Twitter Client
Other helpful commands:
home <num>— show <num> tweets from the home stream
me <num>— show <num> of your tweets
If you take Rainbow Stream for a spin let us know by tweeting us or by using the #rainbowstream hashtag!