update references to ctags in the docs

This commit is contained in:
Paul Gauthier 2023-10-19 15:49:44 -07:00
parent 3c817e9895
commit 427dcf67b5
3 changed files with 7 additions and 58 deletions

View file

@ -8,7 +8,7 @@ GPT to edit the code and your own editor to make changes yourself.
Aider makes sure edits from you and GPT are
[committed to git](https://aider.chat/docs/faq.html#how-does-aider-use-git)
with sensible commit messages.
Aider is unique in that it [works well with pre-existing, larger codebases](https://aider.chat/docs/ctags.html).
Aider is unique in that it [works well with pre-existing, larger codebases](https://aider.chat/docs/repomap.html).
<p align="center">
<img src="assets/screencast.svg" alt="aider screencast">
@ -61,7 +61,7 @@ Here are some example transcripts that show how you can chat with `aider` to wri
* [**Complex Multi-file Change with Debugging**](https://aider.chat/examples/complex-change.html): 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**](https://aider.chat/examples/add-test.html): 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 ctags](https://aider.chat/docs/ctags.html).
[high level map of the repository based on tree-sitter](https://aider.chat/docs/repomap.html).
You can find more chat transcripts on the [examples page](https://aider.chat/examples/).
@ -73,7 +73,7 @@ You can find more chat transcripts on the [examples page](https://aider.chat/exa
* Aider will apply the edits suggested by GPT directly to your source files.
* Aider will [automatically commit each changeset to your local git repo](https://aider.chat/docs/faq.html#how-does-aider-use-git) 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](https://aider.chat/docs/ctags.html), which helps it understand and modify large codebases.
* Aider can [give *GPT-4* a map of your entire git repo](https://aider.chat/docs/repomap.html), 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.
@ -134,7 +134,7 @@ Aider has some ability to help GPT figure out which files to edit all by itself,
* 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](https://aider.chat/docs/ctags.html). So GPT may ask to see additional files if it feels that's needed for your requests.
* 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](https://aider.chat/docs/repomap.html). 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](https://news.ycombinator.com/item?id=36211879).

View file

@ -20,11 +20,11 @@ Aider is tightly integrated with git, which makes it easy to:
- Manage a series of GPT's changes on a git branch
Aider specifically uses git in these ways:
- It asks to create a git repo if you launch it in a directory without one.
- Whenever GPT edits a file, aider commits those changes with a descriptive commit message. This makes it easy to undo or review GPT's changes.
- Aider takes special care if GPT tries to edit files that already have uncommitted changes (dirty files). Aider will first commit any preexisting changes with a descriptive commit message. This keeps your edits separate from GPT's edits, and makes sure you never lose your work if GPT makes an inappropriate change.
Aider also allows you to use in-chat commands to `/diff` or `/undo` the last change made by GPT.
To do more complex management of your git history, you cat use raw `git` commands,
either by using `/git` within the chat, or with standard git tools outside of aider.
@ -58,7 +58,7 @@ They have large context windows, better coding skills and
they generally obey the instructions in the system prompt.
GPT-4 is able to structure code edits as simple "diffs"
and use a
[repository map](https://aider.chat/docs/ctags.html)
[repository map](https://aider.chat/docs/repomap.html)
to improve its ability to make changes in larger codebases.
GPT-3.5 is supported more experimentally

View file

@ -7,7 +7,6 @@
Optional steps:
- [Install universal ctags (optional)](#install-universal-ctags-optional)
- [Add aider to your editor (optional)](#add-aider-to-your-editor-optional)
- [Install PortAudio (optional)](#install-portaudio-optional)
@ -62,56 +61,6 @@ The rest of the install steps are completely optional.
---
## Install universal ctags (optional)
Aider does not require ctags, and will operate just fine without it.
Installing ctags is helpful if you plan to use aider and GPT-4 with repositories
that have more than a handful of files.
This allows aider to build a
[map of your entire git repo](https://aider.chat/docs/ctags.html)
and share it with GPT to help it better understand and modify large codebases.
Aider only attempts to use ctags with GPT-4,
and currently doesn't use ctags at all with GPT-3.5.
So if your OpenAI API key doesn't support GPT-4, then you don't need ctags.
You should consult the
[universal ctags repo](https://github.com/universal-ctags/ctags)
for official instructions on how to install it in your environment.
But you may be able to install a compatible version using these commands:
* Mac: `brew update && brew install universal-ctags`
* Windows: `choco install universal-ctags`
* Ubuntu: `sudo apt update && sudo apt install universal-ctags`
You know aider has found a working ctags if you see this output when you launch aider:
```
Aider v0.8.3-dev
Model: gpt-4
Git repo: .git
Repo-map: universal-ctags using 1024 tokens <======
```
Some things to be aware of:
* The `ctags` command needs to be on your shell path so that it will run by default when aider invokes `ctags ...`.
* You need a build which includes the json feature. You can check by running `ctags --version` and looking for `+json` in the `Optional compiled features` list.
```
$ ctags --version
Universal Ctags 6.0.0, Copyright (C) 2015-2022 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Jun 25 2023, 07:31:18
URL: https://ctags.io/
Output version: 0.0
Optional compiled features: +wildcards, +regex, +gnulib_fnmatch, +gnulib_regex, +iconv, +option-directory, +xpath, +json, +interactive, +yaml, +case-insensitive-filenames, +packcc, +optscript, +pcre2
```
## Install PortAudio (optional)
Aider supports [coding with your voice](https://aider.chat/docs/voice.html)