Giter Club home page Giter Club logo

Comments (4)

bakks avatar bakks commented on August 22, 2024 1

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

  • When I say in the readme that butterfish "manages your shell history", this is actually pretty basic. Butterfish just keeps track of the commands, outputs, prompts, and LLM outputs in memory while you're using Butterfish, and sends those to the LLM as context. It doesn't save-to-disk or load older stuff.
  • I don't think atuin will conflict with butterfish (which is designed to be a layer on top of things that doesn't break customizations like this) but i'm not certain, I'll give it a try when I get a chance. I use something with fzf for my ctrl-r and it works fine.
  • That being said there's probably opportunity to make butterfish more compatible with atuin. Some potential features I can think of are:
    • Load older history when you start butterfish shell. One reason I don't do this with 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-L303
    • Use butterfish to generate sql to search the database
    • etc., probably you'll have to judge what's useful for you based on how you use it.

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

from butterfish.

ellie avatar ellie commented on August 22, 2024 1

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

from butterfish.

igor-krawczuk avatar igor-krawczuk commented on August 22, 2024 1

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

from butterfish.

bakks avatar bakks commented on August 22, 2024

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!

from butterfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.