bakks / butterfish

A shell with AI superpowers
https://butterfi.sh
MIT License
346 stars 32 forks source link

Question: Is this compatible with atuin #22

Open igor-krawczuk opened 11 months ago

igor-krawczuk commented 11 months ago

In the docs it says that butterfish "manages my shell history". I'm using https://github.com/atuinsh/atuin to sync my shell history (actually discovered it via the llmshellautocomplete project which leverages it to do something that appears much hackier than your project).

Atuins main "magic" is in storing the shell history in a sqlite library and then implementing search, sync etc. on top of that. I quite like it since I'm often server hopping.

It it possible to use the two concurrently? And if not, off the top of your head, what would be the main steps I'd have to do to contribute compatibility?

bakks commented 11 months ago

Hey @igor-krawczuk, good question, I wasn't aware of atuin but its a very cool project! Here are some notes:

So please give it a try, my guess is butterfish and atuin don't conflict but sometimes there are weird incompatibilities, please let me know if so. And feel free to send pull requests if you want to make them more compatible! I'm happy to help you get those working well.

cc @ellie just as FYI

ellie commented 11 months ago

This looks cool! Thanks for the @ 😄

I also don't see any reason why this wouldn't work.

One reason I don't do this with bash_history is that it doesn't store the outputs

Do you mean output as in stdout, or output as in "did this exit successfully?"

Use butterfish to generate sql to search the database

It'd be preferable to use atuin search so we don't break any possible integration with future database migrations!

I'm happy to help you get those working well.

Likewise

bakks commented 11 months ago

Thanks for your response!

Do you mean output as in stdout, or output as in "did this exit successfully?"

stdout/stderr, butterfish sends everything as part of the llm conversation context. There's probably value loading just the old commands into history, but i haven't implemented.

Anyway @igor-krawczuk feel free to experiment with integration!

igor-krawczuk commented 11 months ago

Okay, I will try this when I'm procrastinating the next time, currently in a deadline crunch so will probably be a while but I'll make a PR or leave a comment here once I had the chance to play a bit