https://github.com/paul-gauthier/aider Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} paul-gauthier / aider Public * Notifications * Fork 839 * Star 7.5k * aider is AI pair programming in your terminal aider.chat/ License Apache-2.0 license 7.5k stars 839 forks Branches Tags Activity Star Notifications * Code * Issues 70 * Pull requests 10 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights paul-gauthier/aider This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Last commit Last Name Name message commit date Latest commit History 3,590 Commits .github .github _layouts _layouts _posts _posts aider aider assets assets benchmark benchmark blog blog docker docker docs docs examples examples scripts scripts share share tests tests .dockerignore .dockerignore .flake8 .flake8 .pre-commit-config.yaml .pre-commit-config.yaml CNAME CNAME HISTORY.md HISTORY.md LICENSE.txt LICENSE.txt MANIFEST.in MANIFEST.in README.md README.md _config.yml _config.yml dev-requirements.in dev-requirements.in dev-requirements.txt dev-requirements.txt pytest.ini pytest.ini requirements.in requirements.in requirements.txt requirements.txt setup.py setup.py View all files Repository files navigation * README * Apache-2.0 license aider is AI pair programming in your terminal Aider is a command line tool that lets you pair program with GPT-3.5/ GPT-4, to edit code stored in your local git repository. Aider will directly edit the code in your local source files, and git commit the changes with sensible commit messages. You can start a new project or work with an existing git repo. Aider is unique in that it lets you ask for changes to pre-existing, larger codebases. aider screencast [6874747073] * Getting started * Example chat transcripts * Features * Usage * Tutorial videos * In-chat commands * Tips * Installation * Voice-to-code * FAQ * Discord * Blog Getting started See the installation instructions for more details, but you can get started quickly like this: $ pip install aider-chat $ export OPENAI_API_KEY=your-key-goes-here $ aider hello.js Using git repo: .git Added hello.js to the chat. hello.js> write a js script that prints hello world Example chat transcripts Here are some example transcripts that show how you can chat with aider to write and edit code with GPT-4. * Hello World Flask App: Start from scratch and have GPT create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence. * Javascript Game Modification: Dive into an existing open-source repo, and get GPT's help to understand it and make modifications. * Complex Multi-file Change with Debugging: GPT makes a complex code change that is coordinated across multiple source files, and resolves bugs by reviewing error output and doc snippets. * Create a Black Box Test Case: GPT creates a "black box" test case without access to the source of the method being tested, using only a high level map of the repository based on tree-sitter. You can find more chat transcripts on the examples page. Features * Chat with GPT about your code by launching aider from the command line with set of source files to discuss and edit together. Aider lets GPT see and edit the content of those files. * GPT can write and edit code in most popular languages: python, javascript, typescript, html, css, etc. * Request new features, changes, improvements, or bug fixes to your code. Ask for new test cases, updated documentation or code refactors. * Aider will apply the edits suggested by GPT directly to your source files. * Aider will automatically commit each changeset to your local git repo with a descriptive commit message. These frequent, automatic commits provide a safety net. It's easy to undo changes or use standard git workflows to manage longer sequences of changes. * You can use aider with multiple source files at once, so GPT can make coordinated code changes across all of them in a single changeset/commit. * Aider can give GPT-4 a map of your entire git repo, which helps it understand and modify large codebases. * You can also edit files by hand using your editor while chatting with aider. Aider will notice these out-of-band edits and keep GPT up to date with the latest versions of your files. This lets you bounce back and forth between the aider chat and your editor, to collaboratively code with GPT. * If you are using gpt-4 through openai directly, you can add image files to your context which will automatically switch you to the gpt-4-vision-preview model Usage Run the aider tool by executing the following command: aider ... If your pip install did not place the aider executable on your path, you can invoke aider like this: python -m aider.main Replace , , etc., with the paths to the source code files you want to work on. These files will be "added to the chat session", so that GPT can see their contents and edit them according to your instructions. You can also just launch aider anywhere in a git repo without naming files on the command line. It will discover all the files in the repo. You can then add and remove individual files in the chat session with the /add and /drop chat commands described below. If you or GPT mention one of the repo's filenames in the conversation, aider will ask if you'd like to add it to the chat. Think about the change you want to make and which files will need to be edited -- add those files to the chat. Don't add all the files in your repo to the chat. Be selective, and just add the files that GPT will need to edit. If you add a bunch of unrelated files, GPT can get overwhelmed and confused (and it costs more tokens). Aider will automatically share snippets from other, related files with GPT so it can understand the rest of your code base. Aider also has many additional command-line options, environment variables or configuration file to set many options. See aider --help for details. In-chat commands Aider supports commands from within the chat, which all start with /. Here are some of the most useful in-chat commands: * /add : Add matching files to the chat session. * /drop : Remove matching files from the chat session. * /undo: Undo the last git commit if it was done by aider. * /diff: Display the diff of the last aider commit. * /run : Run a shell command and optionally add the output to the chat. * /voice: Speak to aider to request code changes with your voice. * /help: Show help about all commands. See the full command docs for more information. Tips * Think about which files need to be edited to make your change and add them to the chat. Aider has some ability to help GPT figure out which files to edit all by itself, but the most effective approach is to explicitly add the needed files to the chat yourself. * Large changes are best performed as a sequence of thoughtful bite sized steps, where you plan out the approach and overall design. Walk GPT through changes like you might with a junior dev. Ask for a refactor to prepare, then ask for the actual change. Spend the time to ask for code quality/structure improvements. * Use Control-C to safely interrupt GPT if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply to GPT with more information or direction. * Use the /run command to run tests, linters, etc and show the output to GPT so it can fix any issues. * Use Meta-ENTER (Esc+ENTER in some environments) to enter multiline chat messages. Or enter { alone on the first line to start a multiline message and } alone on the last line to end it. * If your code is throwing an error, share the error output with GPT using /run or by pasting it into the chat. Let GPT figure out and fix the bug. * GPT knows about a lot of standard tools and libraries, but may get some of the fine details wrong about APIs and function arguments. You can paste doc snippets into the chat to resolve these issues. * GPT can only see the content of the files you specifically "add to the chat". Aider also sends GPT-4 a map of your entire git repo. So GPT may ask to see additional files if it feels that's needed for your requests. * I also shared some general GPT coding tips on Hacker News. Installation See the installation instructions. FAQ For more information, see the FAQ. Kind words from users * The best AI coding assistant so far. -- Matthew Berman * Hands down, this is the best AI coding assistant tool so far. -- IndyDevDan * Aider ... has easily quadrupled my coding productivity. -- SOLAR_FIELDS * It's a cool workflow... Aider's ergonomics are perfect for me. -- qup * It's really like having your senior developer live right in your Git repo - truly amazing! -- rappster * What an amazing tool. It's incredible. -- valyagolev * Aider is such an astounding thing! -- cgrothaus * It was WAY faster than I would be getting off the ground and making the first few working versions. -- Daniel Feldman * THANK YOU for Aider! It really feels like a glimpse into the future of coding. -- derwiki * It's just amazing. It is freeing me to do things I felt were out my comfort zone before. -- Dougie * This project is stellar. -- funkytaco * Amazing project, definitely the best AI coding assistant I've used. -- joshuavial * I am an aider addict. I'm getting so much more work done, but in less time. -- dandandan * After wasting $100 on tokens trying to find something better, I'm back to Aider. It blows everything else out of the water hands down, there's no competition whatsoever. -- SystemSculpt * Best agent for actual dev work in existing codebases. -- Nick Dobos About aider is AI pair programming in your terminal aider.chat/ Topics cli command-line openai gpt-3 gpt-4 chatgpt gpt-35-turbo Resources Readme License Apache-2.0 license Activity Stars 7.5k stars Watchers 80 watching Forks 839 forks Report repository Releases 35 v0.28.0 Latest Apr 9, 2024 + 34 releases Packages 0 No packages published Contributors 15 * @paul-gauthier * @joshuavial * @fahmad91 * @ctoth * @Taik * @mobyvb * @ryanfreckleton * @jevon * @zestysoft * @h0x91b * @jackhallam * @zackees * @omri123 * @eltociear * @ameramayreh Languages * Python 93.5% * Scheme 4.5% * Other 2.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.