Open igor-krawczuk opened 11 months ago
Hey @igor-krawczuk, good question, I wasn't aware of atuin but its a very cool project! Here are some notes:
ctrl-r
and it works fine.bash_history
is that it doesn't store the outputs, it seems like maybe atuin does but I'm not clear. See this code: https://github.com/bakks/butterfish/blob/main/butterfish/shell.go#L163-L303So 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
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
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!
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
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?