Suraj Kushwah's Google-Powered Tuxi Is Like an Alexa, Cortana, or Siri for Your Terminal Window

Tuxi the text-based assistant takes your natural language queries at the terminal and answers them using Google's in-results infoboxes.

ghalfacree
about 3 years ago Productivity

Developer Suraj Kushwah has written a tool designed to bring the world of the voice-activated assistant, like Alexa, Cortana, and Siri, to the Linux terminal: Tuxi.

Voice-activated assistants like Amazon's Alexa, Microsoft's Cortana, and Apple's Siri are undeniably useful — but not everyone likes the thought of an always-on microphone in their home or office. Tuxi, by contrast, operates entirely at the terminal, taking natural-language text-based queries and responding with an answer provided by Google's search system.

"It simply use Google search results," developer Kushwah explains. "By using pup I scrape Google search results and get [in-result] information like answer of one word question or paragraph which Google show on top. Sometimes Google give multiple [in-result] information like one word results and other information. In that case it show result of the basis of priority. I do scraping with pup and use some Unix tools like awk [and] sed to do the magic."

Tuxi's code is relatively straightforward - the entire program is in this screenshot. (📷: Suraj Kushwah)

Using Tuxi is as simple as typing tuxi followed by the question at the terminal. In response, the tool searches Google then scrapes the in-result information box — presenting it in plain text with the occasional reformatting, such as replacing bullet points with asterisks.

"I tested this program whole day ... it's highly accurate and reliable," Kushwah promises. "Also I think it's very useful. You can google stuff without GUI. No need to open browser. You can make scripts. Good for kids. I know it cannot replace Siri or Alexa. But for me it's magic."

The tool is available on GitHub now, under a "do whatever you want" license that only restricts commercial exploitation: "Just don't make money from this," Kuishwah asks, "and if you do 70% is mine."

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles