| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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. You can start a new project or work with an existing repo. Aider makes sure edits from GPT are committed to git with sensible commit messages. Aider is unique in that it works well with pre-existing, larger codebases.
Aider supports OpenAI's new GPT-4 model that has the massive 128k context window. Early benchmark results indicate that it is very fast and a bit better at coding than previous GPT-4 models.
To use it, run aider like this:
aider --model gpt-4-1106-preview
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
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.
Run the aider tool by executing the following command:
aider <file1> <file2> ...
If your pip install did not place the aider executable on your path, you can invoke aider like this:
python -m aider.main <file1> <file2>
Replace <file1>, <file2>, 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.
Aider will work best if you 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.
Aider also has many additional command-line options, environment variables or configuration file to set many options. See aider --help for details.
Aider supports commands from within the chat, which all start with /. Here are some of the most useful in-chat commands:
See the full command docs for more information.
Aider supports all of OpenAI's chat models. You can choose a model with the --model command line argument.
You should probably use GPT-4 if you can. For more details see the FAQ entry that compares GPT-4 vs GPT-3.5.
For a discussion of using other non-OpenAI models, see the FAQ about other LLMs.
See the installation instructions.
For more information, see the FAQ.
| Back | FazBrowse Home | New Git URL |