Betty: your own Siri for Linux’s command line

Ah, the command line. The reason Real Men Do It In Keyboard Only™. But what if I told you there is a program out there, where you can ask it to perform a task in plain language, and it will carry it out for you? Meet Betty.

“It came out of my frustration from never remembering certain commands, like the specific flags for unarchiving a file,” Pickhardt tells us. “It’s hard to remember the exact compress and uncompress commands, and I would always look it up in my cheat sheet. Now, I can just say: ‘Betty, uncompress myfile.tar.gz.'”
Betty is the brainchild of a developer, Jeff Pickhardt. He had the problem most of us have when we want to work with the command line; he constantly had to look up commands to do what he wanted. So he decided to do something about it, and created Betty, a program that translates plain English into Unix commands.
Of course Betty doesn’t receive voice commands like Siri, plus it’s still in its early stages of development, so its vocabulary is still limited. Here are the release notes for the latest 0.1.5 version:

Betty 0.1.5 supports a wide variety of commands, such as:

  • count (number of characters in a file, number of words in a directory, etc.);
  • config (change your name);
  • datetime (current time, date, etc.);
  • Find (find in files);
  • Internet / web queries (download some file, find out what’s the weather like, etc.);
  • file / directory operations (compress/uncompress files, show file size, change permissions, etc.);
  • processes;
  • user commands (what’s my username, real name, ip address, who else is logged in, etc.);
  • control iTunes and Spotify;
  • more.

The good thing though is that the program is open source, and once it gets more traction (there are already 17 contributors) it should be able to receive more updates and expand its vocabulary and thus become even more useful.

So in case you want to install this gem and take it for a spin, it’s relatively easy. You definitely need to have git and ruby installed, so before anything else (we will assume you use a Debian-based distro, like Ubuntu) you need to perform:
$ sudo apt-get install ruby curl git

After that, we will download the latest copy of betty to our home directory, inside the ~/betty folder
$ cd && git clone

Now all we need to do is create an alias for betty, so we can call her by her name. Here’s how to do it:
$ echo "alias betty=\"~/betty/main.rb\"" >> ~/.bashrc
$ source ~/.bashrc

For more information, bug reports, suggestions or to get involved in this cool project, head to Betty’s Github page.

Source: Wired, Web Upd8

You may also like...

Leave a Reply