AI Assistant Translates Your Every Request For The Command Line

If you don’t live on the command line, it can be easy to forget the exact syntax of commands. It often leaves you running to the “/?” or “–help” switches, or else a quick Google search to find the proper incantations. Shell-AI is a machine-learning assistant that could change all that by helping you find the proper command for the job, right on the command line!

Shell-AI accepts natural-language inputs — simply type in “shai” followed by what you’re trying to do. It will then take in your request, run it through an OpenAI language model like GPT-3.5-Turbo, and then present you with three (or more) potential commands. You can then select which command to use and get on with your day.

As demonstrated, it’s more than capable of following commands like “download a random image” or “show only image files ls.” And, hilariously, it responds to the request “do something crazy” with just one suggestion: “rm -rf”. That seems rather fitting.

We wouldn’t blindly follow any commands coming out of a large language model, of course. But, if you know what you’re doing, it could prove a useful little tool to ease your regular duties on the command line.

16 thoughts on “AI Assistant Translates Your Every Request For The Command Line

  1. Okay, so how is this superior to, say, concatenating the short-form –help texts for all executables on your system into a single file, then searching that file for keywords?

      1. I’m not sure suggesting programs you don’t have installed is a bonus.

        This will also likely be blissfully ignorant of any differences in your distro’s versions of tools. That bites even with manual searches on the web.

        What would be helpful is a nice shell integration which showed you a nicely formatted version of the man for a tool as you were using it and helped you construct the parama you need.

  2. What if maybe someone is using Win10 still (because lots of stuff runs in it, and I doubt my folks would understand Linux being that they only kinda know Windows enough to play Angry Birds)… is there a way to get this working in the cmd line or (shudder) PowerShell?

    1. You could install MinGW, which is a development environment for Windows that allows compiling programs written for Unix or Linux into Windows executables. Part of what makes this work is a command window that includes most of the Unix/Linux utilities (the “GNU” utility programs) as well as the GNU Compiler and (wait for it) vi, so this is also a great way of working in Windows as if it were Linux.

  3. Seems all cool and such, but I don’t think it is something for me, as I’m still struggling on a daily basis with the autocorrect functions and the speech recognition on my phone. For some reason the computer always seems to suggest what I do no want and in the end it will be taken longer to do it the “better way” than to do it the regular way. But that could be the first baby steps of progress I guess.
    Than again I’m also struggling with the concept of the hamburger menu on my phone and the constantly differently looking user interfaces, touchscreen is nice, but not when the simplest buttons are in a different place or have a different look in every app. Consistency is the key to a good user interface, if you need help of some sort, perhaps the interface isn’t the right one.
    3 bars to indicate a menu… hold for a second to activate another submenu, slide left, slide right, swipe, but it has to go right otherwise you activate some unwanted function you didn’t know about yet. Thick fingers or a cold day… your screwed. But that’s just phones, so I digress.
    Some while ago, we’ve hit a sweet spot, drop down menus, choose an item from a list of a logically arranged menu. Every item only had one place and one way to use it.
    These days there are various option to do the same thing in sometimes the same app… which also changes slightly enough on every update to be confusing as hell. So googling for help isn’t useful as screenshots never look the way it looks on your system. Which is perhaps one of the reasons most apps don’t even have a manual any more, because nobody seems to know how it works exactly, and why write a manual… it needs to be changed constantly. Don’t get me started about the minimal user interfaces where items are so small that you need to be pixel exact to be able to move a slider or to make a simple menu appear.

    Ahhhh… anyway text interfaces have their advantage of being screwed up less, but without a minimal help function your completely lost, so regarding the project… as long as you can turn it off again, it certainly could be useful.

    I’m going to sit down now for a minute, in the corner of the room, in silence, curtains closed and maybe cry a bit. Sorry for bothering you with my mental breakdown…

    1. And if COURSE you can turn it off. For now, anyway. And when they remove THAT option, and you object, the question will be, “Why would you NOT want assistance from the AI?”, and as you try to formulate the answer to that, you will realize how hopeless THAT is, and you just say, “none of your GD business!”
      One day, I was sitting at the bar, minding my own business, tapping away on my phone screen, and someone nearby says, “I can show you how to do that faster,” to which I replied, “what is it you think I’m doing?”
      I think the problem isn’t AI, but the fact that PEOPLE expect us to all be following the same script.
      Another day, I’m rearranging and renaming video files from the day’s shoot, and the cinematographer asks me, incredulous, “are you doing that in a command line?”, as if I was some sort of necromancer.
      Yeah, you know where I’m going, so I won’t bother to go there.
      Peace.

  4. I like this idea. Sometimes i can’t be bothered to read the man pages and concoct a command pipeline to do something wacky i’m not going to do again for 4 months, and is not worth writing a bash alias or bash file for.

    Plus, the cool factor.

    AI and the linux terminal are meant to be friends. There’s a monolith of user data and bash terminal usage to train from, and it’s a lot easier to ask an AI to “collect all the loose files in the download folder and put them in new directories named for their file extensions” than to do it yourself. It’s too cool not to use.

    “Write me a program in C++ that ——-, then compile it and run on this file. The available compiler and libraries are in ——- config file.”

    It’s only roughed out, but AI is going to be a wild ride from here on out. Why not learn to use it while it’s still new?

    1. Why not? Well, how about because there is zero assurance that the AI is using good programming practice, for one thing. And if you think it’s sometimes difficult to maintain code written by humans, because they don’t always explain why they do things a certain way, just imagine try following what an AI is “thinking”, when the only comments are the contradictory ones that got dragged in with the various borrowed code snippets.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.