mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
Adapted content for just the docs
This commit is contained in:
parent
1787bf4b5b
commit
8c77cf63fd
34 changed files with 185 additions and 119 deletions
|
@ -2,6 +2,7 @@
|
|||
title: The January GPT-4 Turbo is lazier than the last version
|
||||
excerpt: The new `gpt-4-0125-preview` model is quantiatively lazier at coding than previous GPT-4 versions, according to a new "laziness" benchmark.
|
||||
highlight_image: /assets/benchmarks-0125.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
# The January GPT-4 Turbo is lazier than the last version
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: Code editing benchmarks for OpenAI's "1106" models
|
||||
excerpt: A quantitative comparison of the code editing capabilities of the new GPT-3.5 and GPT-4 versions that were released in Nov 2023.
|
||||
highlight_image: /assets/benchmarks-1106.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
# Code editing benchmarks for OpenAI's "1106" models
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Speed benchmarks of GPT-4 Turbo and gpt-3.5-turbo-1106
|
|||
excerpt: This report provides a detailed comparison of the speed of GPT-4 Turbo and gpt-3.5-turbo-1106 models based on the aider benchmarking suite.
|
||||
canonical_url: https://aider.chat/2023/11/06/benchmarks-speed-1106.html
|
||||
highlight_image: /assets/benchmarks-speed-1106.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
# Speed benchmarks of GPT-4 Turbo and gpt-3.5-turbo-1106
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: GPT code editing benchmarks
|
||||
excerpt: Benchmarking GPT-3.5 and GPT-4 code editing skill using a new code editing benchmark suite based on the Exercism python exercises.
|
||||
highlight_image: /assets/benchmarks.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
# GPT code editing benchmarks
|
||||
|
||||
|
|
1
docs/browser.md
Symbolic link
1
docs/browser.md
Symbolic link
|
@ -0,0 +1 @@
|
|||
../_posts/2024-05-02-browser.md
|
|
@ -1,9 +1,19 @@
|
|||
# Commands
|
||||
---
|
||||
nav_order: 50
|
||||
---
|
||||
# In-chat commands
|
||||
|
||||
|
||||
## In-chat commands
|
||||
|
||||
Aider supports commands from within the chat, which all start with `/`.
|
||||
Here are some of the most useful in-chat commands:
|
||||
|
||||
- `/help`: Show help about all commands
|
||||
- `/exit`: Exit the application
|
||||
|
||||
## context management
|
||||
## Context management
|
||||
|
||||
- `/add <file>`: Add matching files to the chat session using glob patterns
|
||||
- `/drop <file>`: Remove matching files from the chat session
|
||||
- `/web <url>`: Add the contents of a webpage to the chat
|
||||
|
@ -11,18 +21,20 @@
|
|||
- `/ls`: List all known files and those included in the chat session
|
||||
- `/tokens`: Report on the number of tokens used by the current chat context
|
||||
|
||||
## git
|
||||
## Git
|
||||
|
||||
- `/undo`: Undo the last git commit if it was done by aider
|
||||
- `/diff`: Display the diff of the last aider commit
|
||||
- `/commit <message>`: Commit edits to the repo made outside the chat (commit message optional)
|
||||
- `/git <command>`: Run a git command
|
||||
|
||||
## other
|
||||
## Other
|
||||
|
||||
- `/run <command>`: Run a shell command and optionally add the output to the chat, or use `!<command>`.
|
||||
- `/test <command>`: Like run, but automatically adds the output to the chat on non-zero exit codes.
|
||||
- `/voice`: Speak to aider to [request code changes with your voice](https://aider.chat/docs/voice.html).
|
||||
|
||||
# Prompt Toolkit defaults
|
||||
# Keybindings
|
||||
|
||||
The interactive prompt is built with [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) which provides a lot of Emacs and Vi-style keyboard. Some emacs bindings you may find useful are
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
nav_order: 100
|
||||
---
|
||||
# Specifying coding conventions
|
||||
|
||||
Sometimes you want GPT to be aware of certain coding guidelines,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: Improving GPT-4's codebase understanding with ctags
|
||||
excerpt: Using ctags to build a "repository map" to increase GPT-4's ability to understand a large code base.
|
||||
highlight_image: /assets/robot-flowchart.png
|
||||
nav_exclude: true
|
||||
---
|
||||
# Improving GPT-4's codebase understanding with ctags
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
---
|
||||
nav_order: 100
|
||||
---
|
||||
|
||||
# Run aider with docker (experimental)
|
||||
# Run aider with docker
|
||||
|
||||
You can run aider via docker without doing any local installation, like this:
|
||||
|
||||
|
|
19
docs/faq.md
19
docs/faq.md
|
@ -1,17 +1,12 @@
|
|||
---
|
||||
nav_order: 60
|
||||
---
|
||||
|
||||
# Frequently asked questions
|
||||
{: .no_toc }
|
||||
|
||||
- [How does aider use git?](#how-does-aider-use-git)
|
||||
- [Can I use aider with other LLMs, local LLMs, etc?](https://aider.chat/docs/llms.html)
|
||||
- [Can I run aider in Google Colab?](#can-i-run-aider-in-google-colab)
|
||||
- [How can I run aider locally from source code?](#how-can-i-run-aider-locally-from-source-code)
|
||||
- [Can I script aider?](#can-i-script-aider)
|
||||
- [What code languages does aider support?](#what-code-languages-does-aider-support)
|
||||
- [How to use pipx to avoid python package conflicts?](#how-to-use-pipx-to-avoid-python-package-conflicts)
|
||||
- [Aider isn't editing my files?](#aider-isnt-editing-my-files)
|
||||
- [How can I add ALL the files to the chat?](#how-can-i-add-all-the-files-to-the-chat)
|
||||
- [Can I specify guidelines or conventions?](#can-i-specify-guidelines-or-conventions)
|
||||
- [Can I change the system prompts that aider uses?](#can-i-change-the-system-prompts-that-aider-uses)
|
||||
- TOC
|
||||
{:toc}
|
||||
|
||||
## How does aider use git?
|
||||
|
||||
|
@ -63,7 +58,7 @@ pip install -r requirements.txt
|
|||
python -m aider.main
|
||||
```
|
||||
|
||||
# Can I script aider?
|
||||
## Can I script aider?
|
||||
|
||||
You can script aider via the command line or python.
|
||||
|
||||
|
|
|
@ -1,12 +1,29 @@
|
|||
---
|
||||
title: Installation
|
||||
nav_order: 20
|
||||
---
|
||||
|
||||
# Installing aider
|
||||
{: .no_toc }
|
||||
|
||||
- [Install git](#install-git)
|
||||
- [Get your API key](#get-your-api-key)
|
||||
- [Windows install](#windows-install)
|
||||
- [Mac/Linux install](#maclinux-install)
|
||||
- [Working with other LLMs](https://aider.chat/docs/llms.html)
|
||||
- [Tutorial videos](#tutorial-videos)
|
||||
- TOC
|
||||
{:toc}
|
||||
|
||||
## Quick start
|
||||
|
||||
```
|
||||
$ pip install aider-chat
|
||||
|
||||
# To work with GPT-4o
|
||||
$ export OPENAI_API_KEY=your-key-goes-here
|
||||
$ aider
|
||||
|
||||
# To work with Claude 3 Opus:
|
||||
$ export ANTHROPIC_API_KEY=your-key-goes-here
|
||||
$ aider --opus
|
||||
```
|
||||
|
||||
Or read on for more detailed installation instructions.
|
||||
|
||||
## Install git
|
||||
|
||||
|
@ -53,17 +70,9 @@ $ aider --anthropic-api-key sk-xxx... --opus
|
|||
|
||||
Aider works well with GPT-4o, Claude 3 Opus, GPT-3.5 and supports [connecting to almost any LLM](https://aider.chat/docs/llms.html).
|
||||
|
||||
## Tutorial videos
|
||||
|
||||
Here are a few tutorial videos:
|
||||
|
||||
- [Aider : the production ready AI coding assistant you've been waiting for](https://www.youtube.com/watch?v=zddJofosJuM) -- Learn Code With JV
|
||||
- [Holy Grail: FREE Coding Assistant That Can Build From EXISTING CODE BASE](https://www.youtube.com/watch?v=df8afeb1FY8) -- Matthew Berman
|
||||
- [Aider: This AI Coder Can Create AND Update Git Codebases](https://www.youtube.com/watch?v=EqLyFT78Sig) -- Ian Wootten
|
||||
|
||||
## You are done!
|
||||
|
||||
See the [usage instructions](/#usage) to start coding with aider.
|
||||
See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.
|
||||
|
||||
---
|
||||
|
||||
|
@ -78,6 +87,7 @@ The steps below are completely optional.
|
|||
- [Install development versions of aider](#install-development-versions-of-aider-optional)
|
||||
|
||||
## Store your api key (optional)
|
||||
{: .no_toc }
|
||||
|
||||
You can place your api key in an environment variable:
|
||||
|
||||
|
@ -92,6 +102,7 @@ openai-api-key: sk-...
|
|||
```
|
||||
|
||||
## Enable Playwright (optional)
|
||||
{: .no_toc }
|
||||
|
||||
Aider supports adding web pages to the chat with the `/web <url>` command.
|
||||
When you add a url to the chat, aider fetches the page and scrapes its
|
||||
|
@ -116,6 +127,7 @@ for additional information.
|
|||
|
||||
|
||||
## Enable voice coding (optional)
|
||||
{: .no_toc }
|
||||
|
||||
Aider supports [coding with your voice](https://aider.chat/docs/voice.html)
|
||||
using the in-chat `/voice` command.
|
||||
|
@ -128,6 +140,7 @@ Installing PortAudio is completely optional, but can usually be accomplished lik
|
|||
- For Linux, do `sudo apt-get install libportaudio2`
|
||||
|
||||
## Add aider to your editor (optional)
|
||||
{: .no_toc }
|
||||
|
||||
Other projects have integrated aider into some IDE/editors.
|
||||
It's not clear if they are tracking the latest
|
||||
|
@ -136,12 +149,14 @@ so it may be best to just run the latest
|
|||
aider in a terminal alongside your editor.
|
||||
|
||||
### NeoVim
|
||||
{: .no_toc }
|
||||
|
||||
[joshuavial](https://github.com/joshuavial) provided a NeoVim plugin for aider:
|
||||
|
||||
[https://github.com/joshuavial/aider.nvim](https://github.com/joshuavial/aider.nvim)
|
||||
|
||||
### VS Code
|
||||
{: .no_toc }
|
||||
|
||||
joshuavial also confirmed that aider works inside a VS Code terminal window.
|
||||
Aider detects if it is running inside VSCode and turns off pretty/color output,
|
||||
|
@ -152,6 +167,7 @@ since the VSCode terminal doesn't seem to support it well.
|
|||
[https://marketplace.visualstudio.com/items?itemName=MattFlower.aider](https://marketplace.visualstudio.com/items?itemName=MattFlower.aider)
|
||||
|
||||
### Other editors
|
||||
{: .no_toc }
|
||||
|
||||
If you are interested in creating an aider plugin for your favorite editor,
|
||||
please let me know by opening a
|
||||
|
@ -159,6 +175,7 @@ please let me know by opening a
|
|||
|
||||
|
||||
## Install development versions of aider (optional)
|
||||
{: .no_toc }
|
||||
|
||||
If you want to install the very latest development version of aider:
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
highlight_image: /assets/leaderboard.jpg
|
||||
nav_order: 900
|
||||
---
|
||||
|
||||
# Aider LLM Leaderboards
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Connecting to LLMs
|
||||
nav_order: 70
|
||||
---
|
||||
|
||||
# Aider can connect to most LLMs
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: Building a better repository map with tree sitter
|
||||
excerpt: Tree-sitter allows aider to build a repo map that better summarizes large code bases.
|
||||
highlight_image: /assets/robot-ast.png
|
||||
nav_exclude: true
|
||||
---
|
||||
# Building a better repository map with tree sitter
|
||||
|
||||
|
|
18
docs/tips.md
Normal file
18
docs/tips.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
nav_order: 50
|
||||
---
|
||||
|
||||
## Tips
|
||||
|
||||
* Think about which files need to be edited to make your change and add them to the chat.
|
||||
Aider can help the LLM figure out which files to edit all by itself, but the most efficient approach is to add the needed files to the chat yourself.
|
||||
* Don't add *everything* to the chat, just the files you think need to be edited.
|
||||
Aider also sends the LLM a [map of your entire git repo](https://aider.chat/docs/repomap.html).
|
||||
So the LLM can see all the other relevant parts of your code base.
|
||||
* Large changes are best performed as a sequence of thoughtful bite sized steps, where you plan out the approach and overall design. Walk the LLM 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 the LLM 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 the LLM with more information or direction.
|
||||
* Use the `/run` and `/test` commands to run the code or tests and show the output to the LLM 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 the LLM using `/run` or by pasting it into the chat. Let the LLM figure out and fix the bug.
|
||||
* LLMs know 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.
|
||||
|
13
docs/tutorials.md
Normal file
13
docs/tutorials.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
nav_order: 25
|
||||
---
|
||||
|
||||
## Tutorial videos
|
||||
|
||||
Here are a few tutorial videos made by aider users:
|
||||
|
||||
- [Aider : the production ready AI coding assistant you've been waiting for](https://www.youtube.com/watch?v=zddJofosJuM) -- Learn Code With JV
|
||||
- [Holy Grail: FREE Coding Assistant That Can Build From EXISTING CODE BASE](https://www.youtube.com/watch?v=df8afeb1FY8) -- Matthew Berman
|
||||
- [Aider: This AI Coder Can Create AND Update Git Codebases](https://www.youtube.com/watch?v=EqLyFT78Sig) -- Ian Wootten
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
title: Unified diffs make GPT-4 Turbo 3X less lazy
|
||||
excerpt: GPT-4 Turbo has a problem with lazy coding, which can be signiciantly improved by asking for code changes formatted as unified diffs.
|
||||
highlight_image: /assets/benchmarks-udiff.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
# Unified diffs make GPT-4 Turbo 3X less lazy
|
||||
|
||||
|
|
31
docs/usage.md
Normal file
31
docs/usage.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
nav_order: 30
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
Run `aider` with the source code files you want to edit.
|
||||
These files will be "added to the chat session", so that the LLM can see their
|
||||
contents and edit them according to your instructions.
|
||||
|
||||
```
|
||||
aider <file1> <file2> ...
|
||||
```
|
||||
|
||||
Be selective, and just add the files that the LLM will need to edit.
|
||||
If you add a bunch of unrelated files, the LLM can get overwhelmed
|
||||
and confused (and it costs more tokens).
|
||||
Aider will automatically
|
||||
share snippets from other, related files with the LLM so it can
|
||||
[understand the rest of your code base](https://aider.chat/docs/repomap.html).
|
||||
|
||||
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 the LLM mention any of the repo's filenames in the conversation,
|
||||
aider will ask if you'd like to add them to the chat.
|
||||
|
||||
Aider also has many other options which can be set with
|
||||
command line switches, environment variables or via a configuration file.
|
||||
See `aider --help` for details.
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
nav_order: 100
|
||||
---
|
||||
|
||||
# Voice-to-code with aider
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue