Rainbow stream is a free open source, smart and nice terminal based twitter client. It provides real time tweet stream, compose, search, favourite and much more fun directly from linux terminal. It is written in Python and built on top of twitter API and python twitter tool. To run this application in your console you must install python and pip version 2.7.x or 3.x.
Features of Rainbow-Stream
1) Free and open source twitter-client for Linux command-line.
2) Capable of rendering twitter image in Terminal.
3) Supports proxy.
4) Supports interactive mode.
5) Theme customization is implemented.
6) It has the capability of showing real-time twitter stream.
7) You can tweet, search, favourite tweets right from your terminal.
Installation of Rainbow-Stream Twitter Client in Linux Ubuntu
Before installing rainbow stream, update your system with the following command.
root@ubuntu:~# apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB] Get:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [123 kB] Get:4 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [120 kB] Get:5 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [48.1 kB] AppStream cache update completed, but some metadata was ignored due to errors. Reading package lists... Done root@ubuntu:~#
After update your system you will need install python and pip (2.7.x or 3.x) for installing rainbow stream. You must check the version of python if it is installed or not by using the following command .
shah@ubuntu:~$ python --version Python 2.7.12 shah@ubuntu:~$
To install python-pip package, use the following command .
root@ubuntu:~# apt-get install python-pip -y
To check the version of installed pip, use the following command .
shah@ubuntu:~$ pip –version pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7) shah@ubuntu:~$
After installing python & pip , now its time to install rainbow stream twitter client.
root@ubuntu:~# pip install rainbowstream
The sample output should be like this –
The directory '/home/shah/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/shah/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting rainbowstream Downloading rainbowstream-1.3.4.tar.gz (47kB) 100% |████████████████████████████████| 51kB 26kB/s Collecting python-dateutil (from rainbowstream) Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB) 100% |████████████████████████████████| 204kB 41kB/s Collecting arrow (from rainbowstream) Downloading arrow-0.8.0.tar.gz (81kB) 100% |████████████████████████████████| 81kB 24kB/s Running setup.py install for PySocks ... done Running setup.py install for rainbowstream ... done Successfully installed Pillow-3.3.0 PySocks-1.5.7 arrow-0.8.0 pyfiglet-0.7.5 python-dateutil-2.5.3 rainbowstream-1.3.4 requests-2.5.3 six-1.10.0 twitter-1.17.1 You are using pip version 8.1.1, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@ubuntu:~#
After successful installation rainbow-stream you get the above pip version upgrade message in your terminal. Please run below command for upgrade pip version .
root@ubuntu:~# pip install --upgrade pip The directory '/home/shah/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/shah/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pip Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB) 100% |████████████████████████████████| 1.2MB 29kB/s Installing collected packages: pip Found existing installation: pip 8.1.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-8.1.2 root@ubuntu:~#
To get the help on rainbow-stream, use the following command
shah@ubuntu:~$ rainbowstream -h
usage: rainbowstream [-h] [-s STREAM] [-to TIMEOUT] [-tt TRACK_KEYWORDS] [-fil FILTER] [-ig IGNORE] [-iot] [-24] [-ph PROXY_HOST] [-pp PROXY_PORT] [-pt PROXY_TYPE] optional arguments: -h, --help show this help message and exit -s STREAM, --stream STREAM Default stream after program start. (Default: mine) -to TIMEOUT, --timeout TIMEOUT Timeout for the stream (seconds). -tt TRACK_KEYWORDS, --track-keywords TRACK_KEYWORDS Search the stream for specific text. -fil FILTER, --filter FILTER Filter specific screen_name. -ig IGNORE, --ignore IGNORE Ignore specific screen_name. -iot, --image-on-term Display all image on terminal. -24, --color-24bit Display images using 24bit color codes. -ph PROXY_HOST, --proxy-host PROXY_HOST Use HTTP/SOCKS proxy for network connections. -pp PROXY_PORT, --proxy-port PROXY_PORT HTTP/SOCKS proxy port (Default: 8080). -pt PROXY_TYPE, --proxy-type PROXY_TYPE Proxy type (HTTP, SOCKS4, SOCKS5; Default: SOCKS5). shah@ubuntu:~$
Rainbow Stream twitter client usage
1) First you need to connect and authorize application on twitter site using your twitter account.
2) Now type 'rainbowstream' in your Linux terminal, as user.
When you enter the above command, it will open a screen as shown below .
Login with your credentials and you will get a pin. If you have already logged into your account, the page should be showing PIN. If you have configured more than one twitter account in your HTTP web browser, consider trying logging out of the other account and login to the account you want to connect.
Copy the PIN from HTTP web Browser into your terminal and hit return key as shown below –
To use Rainbow stream twitter client, use the following command – You are running latest version (1.3.4) Hi there! We're gonna get you all set up to use Rainbow Stream. 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: Opening: https://api.twitter.com/oauth/authorize?oauth_token=ZsApJAAAAAAAXZ0wAAABVmRyEgU (firefox:4584): IBUS-WARNING **: The owner of /home/shah/.config/ibus/bus is not root! Please enter the PIN: ******** That's it! Your authorization keys have been written to /root/.rainbow_oauth. You are running latest version (1.3.4) _ _ _____ | | | | |____ | ___ _ _ _ __ _ __ _ _| | _| |_ _ __ / / / __| | | | '_ \| '_ \| | | | |/ / __| '__| \ \ \__ \ |_| | | | | | | | |_| | <| |_| | .___/ / |___/\__,_|_| |_|_| |_|\__, |_|\_\\__|_| \____/ __/ | |___/ Need tips ? Type "h" and hit Enter key!
Use of Rainbow stream on command line
1) To display trends, use the following command .
The sample output should be like this .
WIRED @WIRED 2016/04/29 10:47:05 ₪:0 ♥:0 id:4 via SocialFlow This is the app you need to wrangle your millions of messengers http://bit.ly/1SU6Rcx
2) To get the list of followers, use the following command-
[@sunnyktr3]: ls fl
3) To get the help, use the following command .
The sample output should be like this .
Hi boss! I'm ready to serve you right now! ----------------------------------------------------------------------------- You are already on your personal stream. Any update from Twitter will show up immediately. In addition, following commands are available right now: ♪ Twitter help h discover will show help for discover commands. h tweets will show help for tweets commands. h messages will show help for messages commands. h friends_and_followers will show help for friends and followers commands. h list will show help for list commands. h stream will show help for stream commands. ♪ Smart shell 111111 * 9 / 7 or any math expression will be evaluate by Python interpreter. Even cal will show the calendar for current month. ♪ Config theme will list available theme. theme monokai will apply monokai theme immediately. config will list all config. config ASCII_ART will output current value of ASCII_ART config key. config TREND_MAX default will output default value of TREND_MAX config key. config CUSTOM_CONFIG drop will drop CUSTOM_CONFIG config key. config IMAGE_ON_TERM = true will set value of IMAGE_ON_TERM config key to True. ♪ Screening h will show this help again. p will pause the stream. r will unpause the stream. c will clear the screen. v will show version info. q will quit. ----------------------------------------------------------------------------- Have fun and hang tight!
4) To display tweet’s images directly in your Terminal, you can do .
[@sunnyktr3]: rainbowstream -iot
5) To see current twitter trend specifically country-wise, for example India (IN).
[@sunnyktr3]: trend IN #RIPpassword: http://twitter.com/search?q=%23RIPpassword #FlipkartFashionWeekend: http://twitter.com/search?q=%23FlipkartFashionWeekend #NextNow: http://twitter.com/search?q=%23NextNow #PsychoRamanTrivia: http://twitter.com/search?q=%23PsychoRamanTrivia Gurudas Kamat: http://twitter.com/search?q=%22Gurudas+Kamat%22 #CrazyHairRemedies: http://twitter.com/search?q=%23CrazyHairRemedies Jamie Vardy: http://twitter.com/search?q=%22Jamie+Vardy%22 Lolab: http://twitter.com/search?q=Lolab Paul Scholes: http://twitter.com/search?q=%22Paul+Scholes%22 Saritha Nair: http://twitter.com/search?q=%22Saritha+Nair%22
The list of commands you will execute to handle your twitter tweets.
6) To view tweets for a particular community or any person
[@sunnyktr3]: switch public #cricket
_ _ _ (_) | | | | ___ _ __ _ ___| | _____| |_ / __| '__| |/ __| |/ / _ \ __| | (__| | | | (__| < __/ |_ \___|_| |_|\___|_|\_\___|\__| nishant @nishant 2016/06/23 15:23:25 ₪:0 ♥:0 id:0 via Twitter Web Client @OruasCricket yeah shouldn't be forgotten the main aim for the division cricket is to get more time for domestic T20 games. Shreya @ReallyShrey 2016/06/23 15:23:25 ₪:0 ♥:0 id:1 via Twitter for Android Have you ever tried Cricket? https://twitter.com/NiallOfficial/status/745912358162276356 A. Ghaffar Dawn News @SportsReporter_ 2016/06/23 15:23:25 ₪:0 ♥:0 id:2 via Twitter for Android Hard to say if even 4 Pakistan journalist able to attend tour.Pakistan need home Cricket.Pakistan suffers. https://twitter.com/ajarrodkimber/status/745915813442486272 Jameshubert @ImJames_ 2016/06/23 15:23:26 ₪:0 ♥:0 id:3 via Twitter for iPhone RT @bhogleharsha: Indian cricket is lucky to have two fine Indian candidates who are keen to coach the national team. It is a good sign. aaku srivastava @shahaala 2016/06/23 15:23:29 ₪:0 ♥:0 id:4 via Twitter Web Client RT @ianuragthakur: Thanks for coming @ShekharGupta, lovely talking to you at HPCA Cricket Stadium Dharamshala. https://t.co/zw0j3pSD2L
7) To quit from Rainbow Stream, use the following command .
The sample output should be like this –
See you next time :)
8) More Helpful rainbowstram command
Command: Description: h help p To pause twitter stream r To resume twitter stream c Clear Screen v Version for twitter stream q To Quit Rainbow Stream theme To list available theme theme Name-of-theme To apply the theme notification To see notification whois @testuserlinux To view profile mentions To show mentions timeline view @ testuserlinux To view timeline s string To search for a string inbox To show inbox fl @twitter_user To follow a person ufl @twitter_user To unfollow a person block @twitter_user To block a person unblock @twitter_user To unblock a person report @twitter_user To report about a account List home To show timeline of list
Rainbow Stream is a convenient twitter cli client which is designed with usability in mind. With an easy enough one-time authentication . this application is for you. It is easy-to-setup and easy-to-use. Though I don’t use twitter very often but this application is really a rainbow and interesting and who knows I start using twitter as much as facebook, just because of interest in this command-line twitter-client. This application is worth giving a try. Let your voice be audible. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread.