Looking for information on the web has become something that we do day in and day out. Whether it is support you are looking for, looking for a product or news about a particular topic, all you have to do is search on the web. Googler, a tool to Google from terminal or it’s a Google terminal.
As a result, search engines have been designed so they can help us sift through or the garbage in order to get the information we seek. There are Google, Bing, and DuckDuckGo just to mention a few. But what do all these have in common? Well, to use these you need a browser such as Firefox or Chromium first. Well does no problem at all; except when all you have is a terminal and no GUI and browser. Also, you may have a GUI and a browser but you wish you did not have to leave the terminal just for that quick search, and thus comes Googler.
Note: googler isn’t affiliated with Google in any way.
What is Googler? (Google terminal)
Googler is a tiny but powerful utility that allows you the power of Google (Web & News) and Google Site Search right from the command-line. It was initially for users who wanted to use google on headless servers without X. You can integrate it with a text-based browser such as lynx or links in order to open your results right from the terminal. However, it has grown into a very handy and flexible utility that delivers much more.
How to install Googler?
Googler requires Python 3.3 or later. Only the latest patch release of each minor version is supported. Users of Ubuntu or Ubuntu based distros can install it via PPA with the following commands:
sudo add-apt-repository ppa:twodopeshaggy/jarun sudo apt-get update sudo apt-get install googler
Or in a more easier way, Googler (Google terminal) is a single standalone script, so you could download just a single file if you’d like to.
sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/v3.3/googler && sudo chmod +x /usr/local/bin/googler
sudo googler -u
How does it work?
Googler will show the title, URL and abstract for each result, which can be directly opened in a browser from or within the terminal. Results are fetched in pages with page navigation. And you can do sequential searches in a single googler instance.
You can fetch a specific number of results, limit your search bt duration and so much more, and all of this in a very clean interface without ads or stray URLs. The shell completion scripts make sure you don’t need to remember any options.
usage: googler [-h] [-s N] [-n N] [-N] [-c TLD] [-l LANG] [-x] [-C] [--colors COLORS] [-j] [-t dN] [-w SITE] [--unfilter] [-p PROXY] [--noua] [--notweak] [--json] [--show-browser-logs] [--np] [-u] [--include-git] [-v] [-d] [KEYWORD [KEYWORD ...]]
Let us look at googler in action.
You can search for any string with googler. For example, over here I am searching for the best website for Linux and Ubuntu news.
Better still, you can search for a particular query within a website such as ‘kde’ with the -w modifier in the screenshot below. I have also specified that only 3 (default is 10) results should be displayed per page.
Alternatively, I can do a google search to look for news items related to kde with the -N modifier. See the screenshot below.
Some more examples
- Google hello world:
$ googler hello world
- Fetch 15 results updated within the last 14 months, starting from the 3rd result for the keywords jungle book in site imdb.com:
$ googler -n 15 -s 3 -t m14 -w imdb.com jungle book
- Read recent news on gadgets:
$ googler -N gadgets
- For more help:
$ googler -h Or $ man googler
Features at a glance
1 – Text-based browser integration
googler works out of the box with several text-based browsers if the BROWSER environment variable is set. For instance, $ export BROWSER=w3m or for one-time use, $ BROWSER=w3m googler query
2 – Terminal Reading Mode or Reader View
You can easily integrate googler with some equally awesome utilities to enjoy your daily dose of news in a completely distraction-free environment.
3 – Colors
googler allows you to customize the color scheme via a six-letter string, reminiscent of BSD LSCOLORS. Find out more from here.
4 – And more
- Fast and clean (no ads, stray URLs or clutter), custom color
- Support for Google keywords
- Open the first result directly in browser
- Comprehensive documentation, man page with handy usage examples
- Non-stop searches: fire new searches at omniprompt without exiting
googler is not for everyone, but if you prefer to work within the terminal, it is a rather nifty tool to have in your arsenal. I love googler although I won’t be using all the time, I will surely be keeping it around. For more information on googler, visit the github page.Thanks for reading and share your thoughts and comments with us in the section below.