SkillAgentSearch skills...

Googler

:mag: Google from the terminal

Install / Use

/learn @jarun/Googler

README

<h1 align="center"><img src="https://cdn.rawgit.com/jarun/googler/master/googler.svg" alt="googler" /></h1> <p align="center"> <a href="https://github.com/jarun/googler/releases/latest"><img src="https://img.shields.io/github/release/jarun/googler.svg?maxAge=600" alt="Latest release" /></a> <a href="https://repology.org/project/googler/versions"><img src="https://repology.org/badge/tiny-repos/googler.svg" alt="Availability"></a> <a href="https://github.com/jarun/googler/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellowgreen.svg?maxAge=2592000" alt="License" /></a> <a href="https://github.com/jarun/googler/actions"><img src="https://github.com/jarun/googler/workflows/ci/badge.svg?branch=master" alt="Build Status" /></a> </p> <p align="center"> <a href="https://asciinema.org/a/85019"><img src="https://i.imgur.com/EbZof9q.png" alt="Asciicast" width="734"/></a> </p>

googler is a power tool to Google (web, news, videos and site search) from the command-line. It shows the title, URL and abstract for each result, which can be directly opened in a browser from the terminal. Results are fetched in pages (with page navigation). Supports sequential searches in a single googler instance.

googler was initially written to cater to headless servers without X. You can integrate it with a text-based browser. However, it has grown into a very handy and flexible utility that delivers much more. For example, fetch any number of results or start anywhere, limit search by any duration, define aliases to google search any number of websites, switch domains easily... 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.

googler isn't affiliated to Google in any way.

Here are some usage examples:

  1. Google hello world:

     $ googler hello world
    
  2. Fetch 15 results updated within the last 14 months, starting from the 3<sup>rd</sup> result for the keywords jungle book in site imdb.com:

     $ googler -n 15 -s 3 -t m14 -w imdb.com jungle book
    

    Or instead of the last 14 months, look for results specifically between Apr 4, 2016 and Dec 31, 2016:

     $ googler -n 15 -s 3 --from 04/04/2016 --to 12/31/2016 -w imdb.com jungle book
    
  3. Read recent news on gadgets:

     $ googler -N gadgets
    
  4. Fetch results on IPL cricket from Google India server in English:

     $ googler -c in -l en IPL cricket
    
  5. Search for videos on PyCon 2020:

     $ googler -V PyCon 2020
    
  6. Search quoted text:

     $ googler it\'s a \"beautiful world\" in spring
    
  7. Search for a specific file type:

     $ googler instrumental filetype:mp3
    
  8. Disable automatic spelling correction, e.g. fetch results for googler instead of google:

     $ googler -x googler
    
  9. I'm feeling lucky search:

     $ googler -j leather jackets
    
  10. Website specific search:

    $ googler -w amazon.com -w ebay.com digital camera
    

    Site specific search continues at omniprompt.

  11. Positional arguments are joined (with delimiting whitespace) to form the final query, so you can be creative with your aliases. For instance, always exclude seoarticlefactory.com from search results:

    $ alias googler='googler " -site:seoarticlefactory.com"'
    $ googler '<hugely popular keyword filled with SEO garbage>'
    
  12. Alias to find definitions of words:

    alias define='googler -n 2 define'
    
  13. Look up n, p, o, O, q, g keywords or a result index at the omniprompt: as the omniprompt recognizes these keys or index strings as commands, you need to prefix them with g, e.g.,

    g n
    g g keywords
    g 1
    
  14. Input and output redirection:

    $ googler -C hello world < input > output
    

    Note that -C is required to avoid printing control characters (for colored output).

  15. Pipe output:

    $ googler -C hello world | tee output
    
  16. Use a custom color scheme, e.g., a warm color scheme designed for Solarized Dark (screenshot):

    $ googler --colors bjdxxy google
    $ GOOGLER_COLORS=bjdxxy googler google
    
  17. Tunnel traffic through an HTTPS proxy, e.g., a local Privoxy instance listening on port 8118:

    $ googler --proxy localhost:8118 google
    

    By default the environment variable https_proxy is used, if defined.

  18. Quote multiple search keywords to auto-complete (using completion script):

    $ googler 'hello w<TAB>
    
  19. More help:

    $ googler -h
    $ man googler
    

More fun stuff you can try with googler:

Table of contents

Features

  • Google Search, Google Site Search, Google News, Google Videos
  • Fast and clean (no ads, stray URLs or clutter), custom color
  • Navigate result pages from omniprompt, open URLs in browser
  • Effortless keyword-based site search with googler @t add-on
  • Search and option completion scripts for Bash, Zsh and Fish
  • Fetch n results in a go, start at the n<sup>th</sup> result
  • Disable automatic spelling correction and search exact keywords
  • Specify duration, country/domain (default: worldwide/.com), language
  • Google keywords (e.g. filetype:mime, site:somesite.com) support
  • Open the first result directly in browser (as in I'm Feeling Lucky)
  • Non-stop searches: fire new searches at omniprompt without exiting
  • HTTPS proxy, User Agent, TLS 1.2 (default) support
  • Comprehensive documentation, man page with handy usage examples
  • Minimal dependencies

Installation

Dependencies

googler requires Python 3.6 or later. Only the latest patch release of each minor version is supported.

To copy url to clipboard at the omniprompt, googler looks for xsel or xclip or termux-clipboard-set (in the same order) on Linux, pbcopy (default installed) on macOS and clip (default installed) on Windows. It also supports GNU Screen and tmux copy-paste buffers in the absence of X11.

From a package manager

Install googler from your package manager. If the version available is dated try an alternative installation method.

<details><summary>Packaging status (expand)</summary> <p> <br> <a href="https://repology.org/project/googler/versions"><img src="https://repology.org/badge/vertical-allrepos/googler.svg" alt="Packaging status"></a> </p> Unlisted packagers: <p> <br> ● <a href="https://snapcraft.io/googler">Snap Store</a> (<code>snap install googler</code>)<br> </p> </details>
Tips for packagers

googler v2.7 and later ships with an in-place self-upgrade mechanism which you may want to disable. To do this, run

$ make disable-self-upgrade

before installation.

Release packages

Packages for Arch Linux, CentOS, Debian, Fedora, openSUSE and Ubuntu are available with the latest stable release.

From source

If you have git installed, clone this repository. Otherwise download the latest stable release or development version.

To install to the default location (/usr/local):

$ sudo make install

To remove googler and associated docs, run

$ sudo make uninstall

PREFIX is supported, in case you want to install to a different location.

Running standalone

googler is a standalone executable (and can run even on environments like Termux). From the containing directory:

$ ./googler

Downloading a single file

googler is a single standalone script, so you could download just a single file if you'd like to.

To install the latest stable version, run

$ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/v4.3.2/googler && sudo chmod +x /usr/local/bin/googler

You could then let googler upgrade itself by running

$ sudo googler -u

Similarly, if you want to install from git master (risky), run

$ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/master/googler && sudo chmod +x /usr/local/bin/googler

and upgrade by running

$ sudo googler -u --include-git

Shell completion

Search keyword and option completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of auto-completion/. Please refer to your shell's manual for installation instructions.

Related Skills

View on GitHub
GitHub Stars6.2k
CategoryDevelopment
Updated2h ago
Forks535

Languages

Python

Security Score

100/100

Audited on Mar 24, 2026

No findings