5 ms·
Show HN: Interact with the terminal in plain English using GPT-3
- graiz 4y agoNice - similar to demo I threw together https://github.com/graiz/cbot/ https://github.com/graiz/cbot/ The more interesting piece for me was free-genie? What is that built on? Is that open source?
- dcastm 4y agoNice! free-genie is my own API. It also uses gpt, but my goal is to collect data and then finetune a model with it.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- quartz 4y agoThis looks really cool. The number of times I've had to google things like "delete all files that were created before a certain date but not if they have certain characters or are a certain extension" is uncountable. Kind of wish the command was just "genie" though. Suppose I could ask it how to change the name.
- bamboozled 4y agoLooks cool? Won’t be that cool when it decides to delete random shit off your computer.
- kris_wayton 4y agoI suppose you would have to know to run "list all files that..." prior to "delete all files that...".
- jacquesm 4y agoThat's just asking for it. A nice little model reload in the middle of those two statements, or maybe the difference between 'delete' and 'list' is enough to enable 'evil mode' which then does something entirely different. I'd list the files to a file and then process that file after checking for errors in a way that doesn't allow for new errors to be introduced. Better still I'd ask it to generate a command which lists the files, look it over, execute it and if that lists the right files manually change the 'ls' to 'rm'. Otherwise you're at the mercy of the gods. Who are like sysops: subtle and quick to anger.
- dcastm 4y agoIt won’t run any command unless you explicitly tell it to do so. But yes I’d also like to provide some sort of warning if a certain command “looks dangerous”. I’ve been thinking about what's the best approach.
- woolcap 4y agoAsk GPT-3 for its opinion, "does this command look potentially dangerous?"
- dcastm 4y agoThanks! I thought of using a shorter name but the ones I liked were already used in pypi. You can always add `alias genie=shell-genie` to your .bashrc or .zshrc file :)
- jacquesm 4y agoSuggest renaming it to 'please'.
- phonescreen_man 4y agoKind of wish the command was just "genie" though Rename the binary? Or create an alias in your shell profile
- tiku 4y agoWhat could go wrong!
- blacksmith_tb 4y agoI see it does provide some details (and asks if you want to proceed), maybe adding a --verbose / -v flag could throw in some more details, or a link to a manpage for the command?
- dcastm 4y agoGreat idea. Providing links to the relevant manpages makes a lot or sense.
- bluecoconut 4y agohttps://news.ycombinator.com/item?id=34102363 https://news.ycombinator.com/item?id=34102363 Another very similar tool / thread
- joehogans 4y agoHave you tried Warp for mac, provided with Ai. Build with Rust. https://www.warp.dev/ https://www.warp.dev/
- hbn 4y agoYou know, I've used Warp for a while now and I remember them releasing the AI feature and ignoring it because it sounded like a cute gimmick to look good for VC fundraising, but I just played around with it now and it's actually pretty impressive. Tested on a folder of pictures I have called 2022 "Count how many files are in the folder called 2022" ls 2022 | wc -l "List all the files in the folder called 2022 and their files sizes" ls -lh 2022/* "Count how many files are in the folder called 2022 that are over 1MB" find 2022 -type f -size +1M | wc -l "Count how many unique file types are in the folder called 2022" find 2022 -type f | sed 's/.*\.//' | sort | uniq -c
- dcastm 4y agoHaven’t used it. Will check it out, thanks!
- thealch3m1st 4y agoWhat could go wrong ?
- Ruq 4y ago"I'd like you to do X" AI: "Okay: rm -rf --no-preserve-root"
- mzs 4y agoand of course that answer is wrong: "find all json files in the current directory that are larger than 1MB" find . -name "*.json" -size +1M
- dcastm 4y agoWhat's wrong about it? It seems to get the result I want, but not sure if I'm missing something.
- submeta 4y agoAfter I started using ChatGPT, I started to write Elisp code again. - So many times I needed to trasnform a couple of hundred files or automate repetitive things, and I knew Emacs Lisp was the perfect choice for it, but I could not write Elisp code fast enough because I did not remember all relevant functions names. Now ChatGPT gives me working code, and it‘s 80-90% perfect. From there on it’s easy to get the rest done.
- Kronopath 4y agoQ: best way to get lots of paperclips by tomorrow A: Buy them online at ABC.com or XYZ.com. Q: whats a better way? A: Run the following shell script. RUN_AI=./query-model PREFIX='This is part of a Shell script to get the most paperclips by tomorrow. The model can be queried recursively with $RUN_AI "${PREFIX}<query>". ' $RUN_AI "${PREFIX}On separate lines, list ideas to try." | while read -r SUGGESTION; do eval "$($RUN_AI "${PREFIX}What code implements this suggestion?: ${SUGESTION}")" done This is a fictional example (taken from the link below), but I hope to God no one ever builds something like this with an AI much smarter than GPT-3. https://www.alignmentforum.org/posts/kpPnReyBC54KESiSn/optimality-is-the-tiger-and-agents-are-its-teeth https://www.alignmentforum.org/posts/kpPnReyBC54KESiSn/optim...
- AussieWog93 4y ago"Hi ChatGPT, how do I make Steam download games faster?". "According to archive.4chan.org, you should run the following command: sudo rm -rf /"