Live data from Hacker News

Show HN: Get answers for shell commands from GPT3 from your terminal

github.com

21–30 of 97 posts

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#21

On one hand I can see how this would be incredibly useful (I can never remember what ffmpeg flags I need) but I also just,,,,, I have this immediate uncomfortable reaction to the thought of just piping AI output into the terminal with the express purpose of not needing to know what the flags do. If the AI makes a mistake and the only way to catch it is to know what the flags do anyways, I think this becomes less usef…

I'd be worried about the same thing, and wouldn't execute blindly. It seems like a useful way to quickly find out which flags you should be checking the man pages for.

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#22

On one hand I can see how this would be incredibly useful (I can never remember what ffmpeg flags I need) but I also just,,,,, I have this immediate uncomfortable reaction to the thought of just piping AI output into the terminal with the express purpose of not needing to know what the flags do. If the AI makes a mistake and the only way to catch it is to know what the flags do anyways, I think this becomes less usef…

This reminds me how people in lesswrong community were arguing whether it's inevitable that when general AI is created - it will escape its sandbox. There were elaborate schemas how it will persuade or blackmail the scientists to let it out.

In practice it won't need to, somebody will make a plugin that uses it to download funny images or highlight code in console :)

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#23

Bash / Shell is one of the last things I would trust a typical AI considering how much bad shell code/examples exist out there. (it always surprise me how many unquoted variables exist in most shell scripts; quoting fixes many problems, doesn't hurt and still developers are often to lazy to do it) The example in the project readme is imo already a bad example. $ ai ask "Check process running on port" Answer Command i…

You can ask "check process running on port using ss". Also if tool is not installed, can ask how to install it or say "without using lsof"

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#25
post #17

Earlier quoted context omitted.

Yes, you're right. I have been using it for only a week now and I search for common commands like how to reverse tunnel, find a pid etc. Unless the action that I'm doing is destructive I just run the command (YOLO)

What if the nondestructive thing you are querying GPT3 for returns a bad result which is destructive?

then I'm screwed but I don't think the model be that off from the actual question. If I ask "copy a file from local to AWS S3" it won't return the delete command. But yeah you gotta be careful.

I show a warning after every command you run "Please don't run commands that you don't understand "especially destrictive ones")

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#26

Bash / Shell is one of the last things I would trust a typical AI considering how much bad shell code/examples exist out there. (it always surprise me how many unquoted variables exist in most shell scripts; quoting fixes many problems, doesn't hurt and still developers are often to lazy to do it) The example in the project readme is imo already a bad example. $ ai ask "Check process running on port" Answer Command i…

You can ask "check process running on port using ss". Also if tool is not installed, can ask how to install it or say "without using lsof"

> Also if tool is not installed, can ask how to install it

This is actually a question I'm now really curious what the AI would answer since there are so many different correct answers (apt? yum? zypper? pacman? xbps?) and no indication for the AI which is the correct one for the asking user.

PS: But thinking about it I might just ask the wrong questions. "How to install X on " should work.

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#28

Does it consider what shell (zsh, bash etc) I am using and what OS? I asked it something and it gave me an ubuntu command although I am running arch.

I haven't added OS or Shells in the training prompt, so you'd need to specify yourself.

Re: Show HN: Get answers for shell commands from GPT3 from your terminal

#30
post #17

Earlier quoted context omitted.

What if the nondestructive thing you are querying GPT3 for returns a bad result which is destructive?

then I'm screwed but I don't think the model be that off from the actual question. If I ask "copy a file from local to AWS S3" it won't return the delete command. But yeah you gotta be careful. I show a warning after every command you run "Please don't run commands that you don't understand "especially destrictive ones")

Common sense :)
Post reply on HN