well — a command-line program to chat with your codebase

55 points makarmakar

Dear fellow Rustaceans,

Arguably the most challenging part of being a programmer is internalizing a lot of details, sometimes implicit, about the codebase you're working with. It takes significant time, even for an experienced developer, to become fully autonomous on a new project.

I've always wanted to find a way to ease this process of memorizing the codebase, and I have also been fascinated with large language models since first learning about them. As you already guessed, my pet project is a thing that utilizes the LLMs' language understanding to answer questions about the repo you are in. As seen on the screenshot, it first scans through the code with Tree Sitter to map out the interrelations among the symbols, after that it reads through the selected source files to understand them, and then it presents its conclusion to the user.

The key point here is that by staying in the command-line interface you do not break context. You do not have to copy-paste anything anywhere, and the conversation just flows.

Other good questions it may help you with:

  • During what period of time were we using a vulnerable version of a certain crate?
  • Who are the top three committers?
  • Is there a user-wide config?

I very much hope someone might find this helpful as well. Any feedback is welcome, both on the code, and on the looks and feels of it:

https://github.com/xhjkl/well

$ cargo install well

screenshot of well in action