top | item 35487248

(no title)

eloff | 2 years ago

Is there something like this for the command line in general? I'd love to have a ? command that takes an optional prompt and feeds my current shell history to chat gpt and gets a recommendation for the last command that failed.

Something like https://github.com/nvbn/thefuck but with some intelligence instead of hard-coded rules.

That's somewhat problematic if you have secrets in there, but you could just not use it if you know you have sensitive things in your shell history. You still need to be aware of that without ChatGPT since most systems save your shell history to the file system where it could remain accessible for much longer than you'd think. IIRC they don't use things from the API for training, but I wouldn't depend on that being safe.

discuss

order

ArenaSource|2 years ago

If you feel brave and have credits to burn https://github.com/jla/gpt-shell (shameless auto-promotion)

Nah, seriously don't use it, is just a small experiment, curious thing is that half of the code is the GPT prompts..

gumballindie|2 years ago

This is hilarious - it’s actions are either outright wrong or already supported by the native shell itself.

smusamashah|2 years ago

A simpler and probably better idea is to create an alias to send request to ChatGPT api via curl. Can create multiple aliases, one to explain a command, another to fix a command.

mpeg|2 years ago

Warp Terminal has an AI command search built in, using natural language. It's pretty nice, if you can get past the fact it requires an account to use it and it's not OSS