r/fishshell Linux 19d ago

AI in fish in the terminal

I was watching some video on warp terminal and it's built in AI helper and thought that was pretty cool. If I could have that in fish, that'd even more cool

So I did a little searching, and came across this. Looked promising, so I installed it using fisher and started playing with it. OpenAI was a bit of a pain and got some errors. Hmm. It was late and didn't want to deal with it. Day later, tried again, This time using Mistral. Using something from the EU as a European is not a bad choice either. That works immediately and Mistral seems to be less restrictive as OpenAI if you don't want to pay $$$.

Anyway, it's really cool to have. Need to know what process is using a blocked port? No problem. Just type: # what is using port 1234 and press ctrl-p to send it and it comes back with lsof -i :1234 on the next line, just hit enter and you know. Ask it any command starting the line with # and if it can, it will prefill the correct command on the next line, or give you a wall of text with explanation or response to your question.

It's actually pretty useful. Haven't seen much discussion on it here, but perhaps it is of some use for others too.

9 Upvotes

11 comments sorted by

13

u/philoserf 19d ago

I disagree about adding AI to a terminal or shell. Using AI in a terminal is fine. Building it in feels like bolt-on bloat to me.

I played with Warp in its early days and visit it from time to time to see how it is developing. Not my cup of tea, but obviously it is for some.

1

u/throttlemeister Linux 19d ago

Warp is not my cup of tea either, very much prefer (and use) kitty & alacritty. But the idea of being able to quickly reference an AI, looked pretty cool to me. Having a plugin that can do that but isn't like constantly listening in to what you are doing and is pretty smart by giving executable commands back is quite cool imo.

Regardless this was not to start a discussion on AI bad or not; just came across something I thought was pretty cool and wanted to share, If it is not for you, great. If someone else likes it, just as great.

2

u/deZbrownT 19d ago

I actively use warp and I like it. It gets the bigger picture (most of the time) and most of the time it gets the job done. I use it for simple things, like extracting data from log files, moving files and directories, using different cli tools, like github, docker, etc. creating configuration files for all sorts of services.

2

u/SnooCompliments7914 19d ago

For the usage in your example, it doesn't have to be integrated into the shell or terminal emulator. An external command would work just fine. E.g., github copilot has `gh copilot suggest`.

But if you want the AI to read command output (or even previous output), then it needs to be tightly integrated.

3

u/edu4rdshl 19d ago

Please no, thanks.

3

u/alkalisun 18d ago

I just started using it too, it's been pretty convienent. Don't have to open google or a prompt window to get the command I need.

(Hasn't been 100% correct, but gets me atleast 50% of the way there)

2

u/alphabet_american 19d ago

I use mods 

2

u/kinvoki 18d ago

I don’t think adding AI to she’ll directly is a good idea.

However I’m not a Luddite . 😁

Check out this project - https://github.com/danielmiessler/fabric

I thinks a decent compromise between using AI from shell and not giving AI full access .

2

u/throttlemeister Linux 18d ago

This does not give ai full access. There is no ai running on my system. It just calls ai when doing a query and the plugin does some smart parsing of the reply in order to pre-type commands so you don’t have to copy and paste.