Google

A ruby gem to give you the power of Google Search in your command line.


Project maintained by Kerrick Hosted on GitHub Pages — Theme by mattgraham

google

The power of Google Search in your command line.

The CLI displays results from the Google Web Search API, allows you to page through the results, and choose a page to view, all without leaving the command line.

Hosted on RubyGems.

Screenshot of `google` in action!

Installation

gem install google # Requires Ruby 1.9

Usage Examples

Typing google --help will list all the available commands. They are also listed here.

The google gem is a simple tool to search Gooogle with via a CLI.
Usage:
    google [options] "my search query string here"
where [options] are:
        --page, -p <i>:   Start by showing the <i>th result page. (Default: 1)
        --size, -s <i>:   Show <i> results on each SERP. Must be between 1 and 8. (Default: 4)
      --result, -r <i>:   Skip the SERP and show the <i>th result.
           --lucky, -l:   I'm feeling lucky! Skip the SERP and show the first result. (Alias to --result 1)
  --no-readability, -e:   Filter the results through readability to get rid of extra content. (Default: true)
     --no-markdown, -m:   Change the results from raw HTML to markdown. (Default: true)
         --version, -v:   Print the version and exit.
            --help, -h:   Show this information and exit.

I'm Feeling Lucky into Less

google -l 'how to install nvidia drivers debian squeeze' | less

Search on a single site

google 'site:randsinrepose.com NADD'

Vanity Search

google '"Kerrick Long" -inurl:kerrick -inurl:kerricklong'

Features

For example,

Enter N or P for pagination, E or Q to quit, or a number to see that result.
> 3 | espeak -a 200 -v en-us

Supported Ruby Versions

This library has only been tested against Ruby 1.9.3. Other versions might be supported, but they haven't been tested.

Acknowledgements

This gem is Powered by Google.

Copyright

Copyright (c) 2012 Kerrick Long. See LICENSE for details.

Dependencies