5 ms·
Call GPT-3 from Terminal
- raydiatian 4y ago% sgpt "What is the Arch Linux wiki url" The official Arch Linux wiki url is https://wiki.archlinux.org/ https://wiki.archlinux.org/
- russfink 4y agoScroll down to the ffmpeg example. I’m curious to try sgpt “check my changes into Git under a new branch named testing”!
- russfink 4y agoOr sgpt “grep for all files containing the string XYZ either in all caps or mixed case, followed by two digits”. Endlessly promising - may eventually lead to the deprecation of man pages.
- teruakohatu 4y ago> may eventually lead to the deprecation of man pages. Which is where, among other things, GPT gets its training data from.
- ilaksh 4y agoI think everything that came after man pages lead to the deprecation of man pages. info, Usenet, forums, Google, Stack Overflow..anything but man pages.
- behnamoh 4y agoHas been done before. I don't know what's new about this to make the HN frontpage.
- cocacola1 4y agoI'm glad it did. I hadn't seen the other ones.
- dinkumthinkum 4y agoIt seems like we need a constant stream of ChatGPT posts. I guess hopefully all the fans will be right and it will replace all knowledge so none of us will even need or be able to afford a computer to be able to use it. :)
- raydiatian 4y ago“Times, they are a-changin” Sorry to disappoint, I too am frustrated about ChatGPT/GPT-3/LLM mainstream gossip deluge, but that doesn’t mean I disagree with augmenting my productivity with the latest tools.
- throwaway888abc 4y agoAs safe as downloading and runing random sh from internet. Love it (great project and one step to future), but would not do any of it on my or clients machines/servers. *From the example, how do you know one of those ffmpeg switches will not wipe your disc ?
- sillysaurusx 4y agoYou don’t. But thankfully such abuses seem rare.
- throwaway888abc 4y agoNot here to argue or prove anything, but to increase awareness. https://github.com/s0md3v/Diggy/issues/11 https://github.com/s0md3v/Diggy/issues/11 ..... ... . As another point to discussion, hope GPT-3 will not hallucinate obfuscated rm -rf into output. Still love this and the tools in other comments
- trentearl 4y agoLooks cool, good work. I made something similar a few months ago, but yours looks a lot more polished. https://github.com/trentearl/aicli https://github.com/trentearl/aicli. https://earlearlearl.com/posts/aibash-openai-command-line https://earlearlearl.com/posts/aibash-openai-command-line I think the next step is to make a platform to create domain specific prompts. For example if you need to use aws cli frequently, write a prompt that has the api types embedded and outputs aws cli filtered through jq. I'm on something like this, hopefully it will benefit this space.
- raydiatian 4y agoNot mine, just the first one I could find that IsActuallyFunctional™.
- Y_Y 4y agoI found this one pretty good: https://github.com/jayhack/llm.sh https://github.com/jayhack/llm.sh
- erikcw 4y agoI was experimenting with the Warp terminal for the first time last week. It includes a similar feature. I was pretty impressed with how well it worked. [0] https://docs.warp.dev/features/entry/ai-command-search# https://docs.warp.dev/features/entry/ai-command-search#
- raydiatian 4y agoI saw that too! Warp is doing a great job of aggregating features. Hope they release a Linux build sooner than later.
- mellosouls 4y agoMacOS only. Just pointing out to save other non-Apple readers time.
- dattmavis 4y agoI will try this out this evening. I want to test how well it generates config files for well-documented software packages like i3wm. Give it some natural language instructions for hot keys and default window behavior and let it go wild. Maybe generate some theming for polybar/rofi & resources based off what I actually want the output to look like.
- ratsmack 4y agoI wonder how long the GPT-3 API will be open for general use. Once big money is involved, it's questionable whether it will remain available.
- jxf 4y agoNot long. Sam Altman has basically said it's extremely expensive to run the queries and they need people to pay for it.
- IanCal 4y agoGPT3 is paid for. ChatGPT is a fine tuned version (or more modified now) with free access.
- jxf 4y agoThe compute to run it is emphatically not free.
- ilaksh 4y agoI just signed up for ChatGPT Plus at $20/month. They have a new "Turbo" model which seems very similar to the normal one. They also said that a ChatGPT API is coming. I use the OpenAI text-davinci-003 for the service I am building which is somewhat like ChatGPT.
- IanCal 4y agoYes, but GPT3 is a paid for product already with no free access (I think they give you some credits when signing up but that's it). This project does not use ChatGPT. ChatGPT is what has free access at the moment.
- e12e 4y agoHm, are there similar projects that simply works as a shell filter? Prompt on std in / answer on stdout ? Would make for a perfect vim companion - select text, hit "!gpt3" - get answer in buffer? I'm not very keen on running some random shell commands directly - but having them pop into my editor (safe and recommended wrapper for strict shell script - or - sample python cli utility etc). Ed: As a bonus it would also compose easily - making adding an interface like https://github.com/jayhack/llm.sh https://github.com/jayhack/llm.sh on top would be trivial... Ed2: i see there's https://github.com/jackMort/ChatGPT.nvim https://github.com/jackMort/ChatGPT.nvim and https://github.com/gakonst/rubberduck-gpt3.vim https://github.com/gakonst/rubberduck-gpt3.vim - both of which would be better if they also/just worked as filters.
- ilaksh 4y agoI use my own similar tool (https://github https://github com/runvnc/askleo) like this in vim :r ! askleo a JavaScript function to reverse a string
- e12e 4y agoThanks! Does it take prompt on stdin too? Fixed link: https://github.com/runvnc/askleo https://github.com/runvnc/askleo
- ilaksh 4y agoHmm. I think just command args.
- e12e 4y agoYes, I had a quick look at the code (nice and simple!). Should be possible to adjust to stdin as well - maybe I'll have a try if I find the time.
- senorsmile 4y agoMight be able to use xargs
- elif 4y agothis is the best thing my brain has been teased with in so long. thank you for the video glad i retired haha elon can hire teenagers now
- synergy20 4y agoHTTPError: 429 Client Error: Too Many Requests for url: https://api.openai.com/v1/completions https://api.openai.com/v1/completions first request got this, why?
- f0e4c2f7 4y agoWow this is really cool. There is a trick with ChatGPT where you can get it to simulate a linux terminal[0]. I'm not sure if that would work with GPT3 but probably? Seems like you could either use this directly or extend the idea to having your real terminal as well as your simulated terminal (keeping in mind with the ChatGPT version you can ask it to add functionality like docker, nix, Kubernetes, python, go, etc) and then pipe things between them. Even without taking it wherever that goes this still seems pretty handy. Edit: Thinking more about this, a cool ui would be either "containers", "VMs", or some other fake abstraction you could spin up and ssh / rsync into. Imagining simulated VMs. Would be pretty useful to be able to shell out to that at will to play around with. Perhaps with the ability to prompt OS and installed programs. [0] https://www.engraved.blog/building-a-virtual-machine-inside/ https://www.engraved.blog/building-a-virtual-machine-inside/
- eightysixfour 4y agoMy favorite demo with ChatGPT is not to ask it to emulate a terminal, but tell it is connected to an Ubuntu 20.04 system by SSH and then ask it to do thing like setup a web server with a blog, secure the server, etc.
- belter 4y agoDoes ChatGPT then spends all day on HN arguing it has to wait for the program to finish compiling?
- jarbus 4y agoThat's a fantastic demo
- renewiltord 4y agoI prefer using copilot.vim and then setting EDITOR to nvim and then using C-x C-e. Like this https://twitter.com/arjie/status/1575201117595926530?s=46&t=K_8J6rG18DrV5bcCLDrrYw https://twitter.com/arjie/status/1575201117595926530?s=46&t=...
- jasfi 4y agoI'd rather use ChatGPT to help me find a reliable command, that I understand. Then create a shell script for it for future use. This is a cool trick that is far from a best practice.