How to Tweet From The Terminal
Rainbow Stream is a terminal-based Twitter client. It's powerful and looks beautiful in the terminal. Along with simple features we would expect, like being able to tweet, retweet and message people, Rainbow Stream also provides a realtime tweet-stream. And all inside the terminal.
This tutorial is a guide on how to use Twitter from the terminal, with Rainbow Stream.
INSTALL RAINBOW STREAM
You will need to have python
and pip
available to Install rainbowstream
.
Python 2.x
pip install rainbowstream
Python 3.x
pip3 install rainbowstream
AUTHORIZE RAINBOW STREAM
We need to do a one-time authorization of our Rainbow Stream client with our Twitter account. Run the rainbowstream
command and wait a few seconds. The authorization link will open up in your default browser. If it did not, the link will be available in the terminal output for you to copy-paste into the address bar of a browser of your choice.
While in the browser Twitter will give you a PIN, use it on the terminal to finish the authorization process.
rainbowstream
You are running latest version (1.5.2)
Hi there! We're gonna get you all set up to use Rainbow Stream.
Opening: https://api.twitter.com/oauth/authorize?oauth_token=3ibp6gAAAAAAXZ0wAAABdqm7VAA
In the web browser window that opens please choose to Allow
access. Copy the PIN number that appears on the next page and paste or
type it here:
Please enter the PIN: 8966940
Once the authorization process is complete, you will be greeted with a prompt with your Twitter tag in it, as shown below. Rainbow Stream is all ready to start accepting commands.
You will start to see your Twitter timeline scrolling by. For exiting the rainbowstream
client, just type in "q
" and press Enter
After this point, you can run the command rainbowstream
anytime to access your Twitter account from the terminal.
USING RAINBOW STREAM
Before we start tweeting, some important commands to know are,
"h
" to get help with commands
"p
" to pause the stream
"r
" to resume/unpause the stream
"c
" to clear the screen
"q
" to quit the rainbow stream client
There are a lot of commands available in Rainbow Stream. Only a very few of them will be shown here. The help (h
) command can help you to get familiar with the other commands, make sure to read it.
1. TWEET
The t
command is used to make a tweet. The words that follow the command will be tweeted out.
t hello from rainbowstream
MyName @mytwittertag 10 seconds ago ♺:0 ♥:0 id:10 via Rainbow Stream hello from rainbowstream
2. RETWEET
The rt
command is used for retweeting tweets. Every tweet that you will see in Rainbow Stream will have an id
along with it. rt 12
will retweet the tweet with id 12
.
rt 12
3. MESSAGE
The mes
command can be used to message someone. To send "hi there" to @someone,
mes @someone hi there
3. WHOIS
To see the profile information of someone, use the whois
command.
whois @ukiatsuya
宇木敦哉 @ukiatsuya : 111 tweets 0 following 34069 followers Cencoroll Director たぶん絵置き場です。たまに宣伝も。 Instagram : https://t.co/XcJYRXPL46 Location : Sapporo URL : https://t.co/LDndfduUQQ Joined 10 years ago
IMAGES
You might think that you will have to give up on images and pictures to use Rainbow Stream. Luckily, we don't have to, at least not entirely. The Rainbow Stream client is capable of rendering images as coloured ASCII arts. This feature is disabled by default. To enable it, run the following config
command.
config IMAGE_ON_TERM = true
An example image, as seen on an 80 character wide terminal window:
