Googler
:mag: Google from the terminal
Install / Use
/learn @jarun/GooglerREADME
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:
-
Google hello world:
$ googler hello world -
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 bookOr 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 -
Read recent news on gadgets:
$ googler -N gadgets -
Fetch results on IPL cricket from Google India server in English:
$ googler -c in -l en IPL cricket -
Search for videos on PyCon 2020:
$ googler -V PyCon 2020 -
Search quoted text:
$ googler it\'s a \"beautiful world\" in spring -
Search for a specific file type:
$ googler instrumental filetype:mp3 -
Disable automatic spelling correction, e.g. fetch results for
googlerinstead ofgoogle:$ googler -x googler -
I'm feeling lucky search:
$ googler -j leather jackets -
Website specific search:
$ googler -w amazon.com -w ebay.com digital cameraSite specific search continues at omniprompt.
-
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>' -
Alias to find definitions of words:
alias define='googler -n 2 define' -
Look up
n,p,o,O,q,g keywordsor a result index at the omniprompt: as the omniprompt recognizes these keys or index strings as commands, you need to prefix them withg, e.g.,g n g g keywords g 1 -
Input and output redirection:
$ googler -C hello world < input > outputNote that
-Cis required to avoid printing control characters (for colored output). -
Pipe output:
$ googler -C hello world | tee output -
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 -
Tunnel traffic through an HTTPS proxy, e.g., a local Privoxy instance listening on port 8118:
$ googler --proxy localhost:8118 googleBy default the environment variable
https_proxyis used, if defined. -
Quote multiple search keywords to auto-complete (using completion script):
$ googler 'hello w<TAB> -
More help:
$ googler -h $ man googler
More fun stuff you can try with googler:
- googler on the iPad
- Print content of results to terminal or listen to it
- Terminal Reading Mode or Reader View
- Stream YouTube videos on desktop
- Search error on StackOverflow from terminal
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.
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
node-connect
332.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
332.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.9kCommit, push, and open a PR
