mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
copy
This commit is contained in:
parent
c087d6b4db
commit
090ef0acd8
2 changed files with 26 additions and 26 deletions
46
README.md
46
README.md
|
@ -1,12 +1,12 @@
|
|||
# Aider
|
||||
|
||||
Aider is a command-line tool that allows you to chat with GPT-4 about your code.
|
||||
Ask GPT for features, improvements, or bug fixes and aider will directly apply the changes to your source files.
|
||||
Ask GPT for features, improvements, or bug fixes and `aider` will directly apply the changes to your source files.
|
||||
Each change is automatically committed to git with a sensible commit message.
|
||||
|
||||
## Example chat transcripts
|
||||
|
||||
Here are some example transcripts that show how you can chat with aider to generate and edit code with GPT-4.
|
||||
Here are some example transcripts that show how you can chat with `aider` to generate and edit code with GPT-4.
|
||||
|
||||
* [Hello World Flask App](examples/hello-world-flask.md): This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.
|
||||
|
||||
|
@ -14,23 +14,23 @@ Here are some example transcripts that show how you can chat with aider to gener
|
|||
|
||||
* [Pong Game with Pygame](examples/pong.md): This example demonstrates how to create a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.
|
||||
|
||||
* [Complex Multi-file Change with Debugging](examples/complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of aider.
|
||||
* [Complex Multi-file Change with Debugging](examples/complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of `aider`.
|
||||
|
||||
You can find more chat transcripts on the [examples page](examples/README.md).
|
||||
|
||||
## Features
|
||||
|
||||
* Chat with GPT-4 about your code by launching aider from the command line with set of source files to discuss and edit together.
|
||||
* Chat with GPT-4 about your code by launching `aider` from the command line with set of source files to discuss and edit together.
|
||||
* 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-4 directly to your source files.
|
||||
* Aider will automatically commit each changeset to your local git repo with a sensible commit message. These frequent, automatic commits provide a safety net. It's easy to undo aider's changes or use standard git workflows to manage longer sequences of changes.
|
||||
* Aider can review multiple source files at once and make coordinated code changes across all of them in a single changeset/commit.
|
||||
* Aider knows about all the files in your repo, so it can ask for permission to review whichever files seem relevant to your requests.
|
||||
* You can also edit the files in your editor while chatting with aider.
|
||||
* Aider will notice if you edit the files outside the chat.
|
||||
* `aider` will apply the edits suggested by GPT-4 directly to your source files.
|
||||
* `aider` will automatically commit each changeset to your local git repo with a sensible commit message. These frequent, automatic commits provide a safety net. It's easy to undo `aider` changes or use standard git workflows to manage longer sequences of changes.
|
||||
* `aider` can review multiple source files at once and make coordinated code changes across all of them in a single changeset/commit.
|
||||
* `aider` knows about all the files in your repo, so it can ask for permission to review whichever files seem relevant to your requests.
|
||||
* You can also edit the files in your editor while chatting with `aider`.
|
||||
* `aider` will notice if you edit the files outside the chat.
|
||||
* It will help you commit these out-of-band changes, if you'd like.
|
||||
* It will bring the updated file contents into the chat.
|
||||
* You can bounce back and forth between the aider chat and your editor, to fluidly collaborate.
|
||||
* You can bounce back and forth between the `aider` chat and your editor, to fluidly collaborate.
|
||||
* Live, colorized, human friendly output.
|
||||
* Readline style chat input history, with autocompletion of code tokens found in the source files being discussed (via `prompt_toolkit` and `pygments` lexers)
|
||||
|
||||
|
@ -41,7 +41,7 @@ You can find more chat transcripts on the [examples page](examples/README.md).
|
|||
|
||||
## Usage
|
||||
|
||||
Run the aider tool by executing the following command:
|
||||
Run the `aider` tool by executing the following command:
|
||||
|
||||
```
|
||||
aider <file1> <file2> ...
|
||||
|
@ -68,12 +68,12 @@ For more information, run `aider --help`.
|
|||
|
||||
## Chat commands
|
||||
|
||||
Aider supports the following commands from within the chat:
|
||||
`aider` supports the following commands from within the chat:
|
||||
|
||||
* `/add <file>`: Add matching files to the chat session.
|
||||
* `/drop <file>`: Remove matching files from the chat session.
|
||||
* `/ls`: List all known files and those included in the chat session.
|
||||
* `/commit [message]`: Commit outstanding changes to the chat session files. Use this to commit edits you made outside the chat, with your editor or git commands. Aider will provide a commit message if you don't.
|
||||
* `/commit [message]`: Commit outstanding changes to the chat session files. Use this to commit edits you made outside the chat, with your editor or git commands. aider will provide a commit message if you don't.
|
||||
* `/undo`: Undo the last git commit if it was done by aider.
|
||||
* `/diff`: Display the diff of the last aider commit.
|
||||
|
||||
|
@ -82,23 +82,23 @@ To use a command, simply type it in the chat input followed by any required argu
|
|||
## Tips
|
||||
|
||||
* Large changes are best performed as a sequence of bite sized steps. Same as if you were undertaking them by yourself.
|
||||
* Use Control-C to safely interrupt aider if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply with more information or direction.
|
||||
* Use Control-C to safely interrupt `aider` if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply with more information or direction.
|
||||
* Enter a multiline chat message by entering `{` alone on the first line. End the multiline message with `}` alone on the last line.
|
||||
* If your code is throwing an error, paste the error message and stack trace into aider as a multiline `{}` message and let aider fix the bug.
|
||||
* If your code is throwing an error, paste the error message and stack trace into `aider` as a multiline `{}` message and let `aider` fix the bug.
|
||||
* GPT-4 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 with the multiline `{}` syntax.
|
||||
* Aider will notice if you launch it on a git repo with uncommitted changes and offer to commit them before proceeding.
|
||||
* Aider can only see the content of the files you specify, but it also gets a list of all the files in the repo. It may ask to see additional files if it feels that's needed for your requests.
|
||||
* `aider` will notice if you launch it on a git repo with uncommitted changes and offer to commit them before proceeding.
|
||||
* `aider` can only see the content of the files you specify, but it also gets a list of all the files in the repo. It may ask to see additional files if it feels that's needed for your requests.
|
||||
|
||||
## Limitations
|
||||
|
||||
Aider basically requires GPT-4.
|
||||
You probably need GPT-4 api access to use `aider`.
|
||||
You can invoke it with `aider -3` to try using gpt-3.5-turbo, but it will almost certainly fail to function correctly.
|
||||
GPT-3.5 is unable to consistently follow directions to generate concise code edits in a stable, parsable format.
|
||||
|
||||
Aider can only edit code that fits in the GPT context window.
|
||||
You can only use `aider` to edit code that fits in the GPT context window.
|
||||
For GPT-4 that is 8k tokens.
|
||||
It helps to be selective about which of your source files you discuss with aider at the same time.
|
||||
It can also help to refactor your code into more, smaller files.
|
||||
Aider can help perform such refactorings, if you start before the files get too large.
|
||||
It helps to be selective about how any source files you discuss with `aider` at the one time.
|
||||
You might consider refactoring your code into more, smaller files (which is usually a good idea anyway).
|
||||
You can use `aider` to help perform such refactorings, if you start before the files get too large.
|
||||
|
||||
If you have access to gpt-4-32k, I would be curious to hear how it works with aider.
|
||||
|
|
|
@ -21,11 +21,11 @@ accomplishing both greenfield generation of new code as well as simple and compl
|
|||
|
||||
* [Pong Game with Pygame](pong.md): This example demonstrates how to create a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.
|
||||
|
||||
* [Complex Multi-file Change with Debugging](complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of aider.
|
||||
* [Complex Multi-file Change with Debugging](complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of `aider`.
|
||||
|
||||
* [Semantic Search & Replace](semantic-search-replace.md): This example showcases aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the function calls that it updates.
|
||||
* [Semantic Search & Replace](semantic-search-replace.md): This example showcases `aider` performing semantic search and replace operations in code, dealing with various formatting and semantic differences in the function calls that it updates.
|
||||
|
||||
* [CSS Exercise: Animation Dropdown Menu](css-exercises.md): This example demonstrates how to complete a CSS exercise involving adding animation to a dropdown menu, creating a bounce illusion when the dropdown expands close to its final end state.
|
||||
|
||||
* [Automatically Update Docs](update-docs.md): This example demonstrates how to use aider to automatically update documentation based on the latest version of the main() function in the code.
|
||||
* [Automatically Update Docs](update-docs.md): This example demonstrates how to use `aider` to automatically update documentation based on the latest version of the main() function in the code.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue