Goosh: a Shell for Google

It’s an ever-continuing debate: what is better, a graphical user interface, or a command-line interface? Graphical user interfaces may be easier to learn, but complicated operations may require a lot more user input than with a command line interface, which can perform several complicated operations by using a short sequence of words and characters. However, a CLI has a much steeper learning curve than a GUI. Google has always had a certain CLI-quality to it, and Stefan Grothkopp decided to take this a few steps further: say hello to Goosh.Goosh, the Google Shell, is a command-line interface of the many functions Google provides, allowing you to do all sorts of cool things. For instance, translate nl en "lang leve de CLI!" will translate said sentence from Dutch (Netherlandic, “nl”) to English. See the image below to get an idea.

Its usefulness is most likely debatable, but that doesn’t mean it isn’t insanely cool.

My first thoughts were: Why use a separate shell for this? Why not write a set of command-line tools that can be used in an existing shell?

I could imagine two reasons. The first is that simple command names like “google” or “translate” aren’t exactly common in today’s command line environments. Few people would ever dare bind a command like “translate” to google services because, “well, people may want to use another translation service, and we also want to give it a cooler name”. Ironically, in the old days of the command-line, such a kind of simplicity was much more common.

The second reason is that Goosh outputs hypertext (e.g. embedded links), for which typical command line environments like bash (let alone Windows’s cmd.exe) are not prepared.

I’m thinking of a desktop applet for the N8*0 tablet. I’m pretty sure one of the existing applets can be config our outright modified to display this url instead of it’s default one.

The hyperlinked output means I can pop open child browsers easily but as mentioned, the best use is instant access to whatever crazy stuff the write in behind the search interface. I may actually learn the translation, conversion and other “search terms” functions beyond searching.

Like vim itself, having a console like interface reduces the need for mouse navigation and adds complex-commands-at-a-single-phrase. (‘:t hello world’ opens a new search tab with the phrase “hello world”).

… Now I wonder if vimperator could be made to interface directly with gosh.org?

A feature for searching images on Google and displaying the ASCII version of them will me at least interesting

I’m thinking forward and may write some stupid ideas… 🙂

First, you need an xargs line parameter processor that puts your input into an HTTP request (it should be easy to implement just by lloking what the browser sends to goosh when you enter some query text); then, you get a HTML answer back which you can process by piping it though lynx -dump or ripping the HTML cover off. If pictures are included, download them and convert them into ASCII art, there are libraries that do help with this kind of conversion. Or you output just a hyperlink so it can be postprocessed in other ways.

I’m thinking of a “real” CLI tool that can be embedded in scipts, or used on the console, the same way you use your usual CLI tools – including information redirection and piping. It would have to be able to be used in dialog mode and in batch mode (without interaction).

Just imagine what fun it could be to use google’s power without the web layer! 🙂