3 ms·
It's good that you have a "read" statement to force confirmation by the user of the command, but all it takes is one errant accidental enter to end up running a
by vunderba 2y ago
It's good that you have a "read" statement to force confirmation by the user of the command, but all it takes is one errant accidental enter to end up running arbitrary code returned from the LLM.
I'd constrain the tool to only run "ffmpeg" and extract the options/parameters from the LLM instead.
- mochajocha 2y ago[flagged]
- magistr4te 2y agoI finished shellmind (https://github.com/wintermute-cell/shellmind https://github.com/wintermute-cell/shellmind) a few days ago, and it might interest you! It avoids having to copy-paste commands, by integrating directly into the shell and let's you review the real command before send-off. It's also general purpose and can handle more then just ffmpeg.
- kernel-panics 2y agoCoincidentally I made a shell script (https://github.com/pgodschalk/dotfiles/blob/main/bin/ai https://github.com/pgodschalk/dotfiles/blob/main/bin/ai) around the same time, though it doesn't put the command in the buffer. I might borrow that idea. One thing I did add though, and would recommend, is an --explain flag. Usually if I don't know e.g. ffmpeg, I tend to want a short overview of what I'm actually about to run.
- sovok 2y agoSeems to be a common thing. I did something similar two days ago. Pretty helpful so far: https://github.com/combatwombat/cmdline-ai-helper https://github.com/combatwombat/cmdline-ai-helper