5 ms·
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 c
by eloff 3y 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 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.
- danielvaughn 3y agoSecurity isn’t a problem if you’re running the model locally. I came across this project and would love to build an embedded version: https://github.com/BuilderIO/ai-shell https://github.com/BuilderIO/ai-shell
- mpeg 3y agoWarp 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
- atarian 3y agoSounds like Copilot for CLI: https://githubnext.com/projects/copilot-cli/ https://githubnext.com/projects/copilot-cli/
- ArenaSource 3y agoIf you feel brave and have credits to burn https://github.com/jla/gpt-shell 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 3y agoThis is hilarious - it’s actions are either outright wrong or already supported by the native shell itself.
- smusamashah 3y agoA 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.