5 ms·
My open source ai coding tool aider is unique in that it is designed to work with existing code bases. You can jump into an existing git repo and start aaking f
by anotherpaulg 3y ago
My open source ai coding tool aider is unique in that it is designed to work with existing code bases. You can jump into an existing git repo and start aaking for changes, new features, etc.
https://github.com/paul-gauthier/aider https://github.com/paul-gauthier/aider
It helps gpt understand larger code bases by building a "repository map" based on analyzing the abstract syntax tree of all the code in the repo. This is all built using tree-sitter, the same tooling which powers code search and navigation on GitHub and in many popular IDEs.
https://aider.chat/docs/repomap.html https://aider.chat/docs/repomap.html
- anotherpaulg 3y agoRelated to the OpenAI announcement, I've been able to generate some preliminary code editing evaluations of the new GPT models. OpenAI is enforcing very low rate limits on the new GPT-4 model. I will update the results as quickly my rate limit allows. https://news.ycombinator.com/item?id=38172621 https://news.ycombinator.com/item?id=38172621 Also, aider now supports these new models, including `gpt-4-1106-preview` with the massive 128k context window. https://github.com/paul-gauthier/aider/releases/tag/v0.17.0 https://github.com/paul-gauthier/aider/releases/tag/v0.17.0
- extr 3y agoDude I love how passionate you are about this project. I see you in every GPT thread. Despite all this tech there are so few projects out there trying to make large-repo code editing/generation possible.
- hanselot 3y agoI think that's mostly because most people are skeptical about trusting people with IP. If there was a way to prove that the data was not being funneled into openai's next models, sure, but where is the proof of that? A piece of paper that says you aren't allowed to do something, does not equate to proof of that thing not being done. Personally I believe all code work should be Open Source by default, as that would ensure the lowest quality code gets filtered out and only the best code gets used for production, resulting in the most efficient solutions dominating (aka, less carbon emissions or children being abused or whatever the politicians say today). So as long as IP exists, companies will continue to drive profit to the max at the expense of every possible resource that has not been regulated. Instead of this model, why not banish IP, make everything open all at once and have only the best, most efficient code running, thereby locating missing children faster, or emitting less carbon, or bombing terrorists better or w/e.
- stavros 3y agoI do love aider, thanks for making it! I'd like an option to stop it from writing files everywhere, though, even if that means I have no history.
- anotherpaulg 3y agoThanks for trying aider! I'd like to better understand your concern about aider's support files. If you're able, maybe file an issue and I'd be happy to try and help make it work better for you. https://github.com/paul-gauthier/aider/issues https://github.com/paul-gauthier/aider/issues
- stavros 3y agoSure, thanks!
- jeswin 3y ago> It helps gpt understand larger code bases by building a "repository map" based on analyzing the abstract syntax tree of all the code in the repo. What I do with codespin[1] (another AI code gen tool) is to give a file/files to GPT and ask for signatures (and comments and maybe autogenerate a description), and then cache it until the file changes. For a lot of algorithmic work, we could just use GPT now. Sure it's less efficient, but as these costs come down it matters less and less. In a way, it's similar to higher level (but inefficient) programming languages vs lower level efficient languages. [1]: https://github.com/codespin-ai/codespin-cli https://github.com/codespin-ai/codespin-cli
- NikhilVerma 3y agoHow do you manage token limits when sending large amounts of code structure to OpenAI?
- anotherpaulg 3y agoAider has a "token budget" for the repository map (--map-tokens, default of 1k). It analyzes the AST of all the code in the repo, the call graph, etc... and uses a graph optimization algorithm to select the most relevant parts of the repo map that will fit in the budget. There's some more detail in the recent writeup about the new tree-sitter based repo map that was linked in my comment above.
- ukuina 3y agoAny plans to open support up for other languages that tree-sitter supports?
- anotherpaulg 3y agoAider supports the repo map for bunch of languages already, see below. Is there one in particular you need that is missing? https://github.com/paul-gauthier/aider/tree/main/aider/queries https://github.com/paul-gauthier/aider/tree/main/aider/queri...
- ukuina 3y agoPerl5, please!
- mcbishop 3y agoThanks a lot for doing this project. Your blog post got me excited.
- vunderba 3y agoI think Cursor.sh is another tool designed around the same principle at least from a repository level awareness scope, but rather than just being CLI it's a full fledged VS Code fork.