Live data from Hacker News

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

github.com

11–20 of 97 posts

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

#11

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…

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)

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

#16
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 is `lsof -i tcp:8000`
Apart from the facts that

- I would say the chances that lsof is installed are significant smaller than ss or netstat

- is lsof notably slower than ss

it is also inferior for the requested task because

- it returns any process connecting to this port not only the listening one. Which process is running on port 443 on my desktop? None. How many processes does 'lsof -i tcp:443` return? 20.

- it does not work if the listening process is from another user (if lsof is not run by root). In this case lsof -i returns nothing while ss -nltp returns the information that the port is listened and only cannot tell by which process because of missing permissions.

My answer to "which process uses port x"

  ss -nltp sport = x

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

#17

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…

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?

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

#18
post #15

Do I have to give my phone number to OpenAI to use this? I don't see why they require it. I wanted to give it a try, but no thanks.

Yeah, asking for number is too much but I think they need to it prevent spam/misuse because they offer you free credits to try out the model.

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

#19

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…

man you should train their AI haha

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

#20
post #15

Do I have to give my phone number to OpenAI to use this? I don't see why they require it. I wanted to give it a try, but no thanks.

They require an email address and a phone number, probably as a way to mitigate spam accounts. If you're worried about privacy, you could probably use a burner for each.
Post reply on HN