-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
broke out instructions, added link to neovim #84
- Loading branch information
1 parent
7e17059
commit ceb84b2
Showing
4 changed files
with
90 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
# Installing aider | ||
|
||
## Install the `aider-chat` package with pip from one of these sources: | ||
|
||
* PyPI hosts the released and most stable version: | ||
* `python -m pip install aider-chat` | ||
* GitHub hosts the latest version, which is under active development: | ||
* `python -m pip install git+https://github.com/paul-gauthier/aider.git` | ||
* If you've git cloned the aider repository already, you can install "live" from your local copy. This is mostly useful if you are developing aider and want your current modifications to take effect immediately. | ||
* `python -m pip install -e .` | ||
|
||
On Windows, you may need to run `py -m pip install ...` to install python packages. | ||
|
||
## Provide your OpenAI API key | ||
|
||
You need a | ||
[paid API key from OpenAI](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) | ||
to use aider. Note that this is different than "ChatGPT Plus". | ||
|
||
You can place your api key in an environment variable: | ||
|
||
* `export OPENAI_API_KEY=sk-...` on Linux or Mac | ||
* `setx OPENAI_API_KEY sk-...` in Windows PowerShell | ||
|
||
Or you can create a `.aider.conf.yml` file in your home directory or at the root of your git repo, | ||
alongside the `.git` dir. Put a line in it like this to specify your api key: | ||
|
||
``` | ||
openai-api-key: sk-... | ||
``` | ||
|
||
Finally, you could also just provide your key as a command line argument: | ||
|
||
``` | ||
aider --openai-api-key sk-... | ||
``` | ||
|
||
## Install git | ||
|
||
Make sure you have git installed and available on your shell path. | ||
Here are | ||
[instructions for installing git in various environments](https://github.com/git-guides/install-git). | ||
|
||
## 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 install universal-ctags` | ||
* Windows: `choco install universal-ctags` | ||
* Ubuntu: `sudo apt-get install universal-ctags` | ||
|
||
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. | ||
|
||
|
||
## Add aider to your editor | ||
|
||
(joshuavial)[https://github.com/joshuavial) has provided a NeoVim plugin for aider: | ||
|
||
* https://github.com/joshuavial/aider.nvim | ||
|
||
If you are interested in creating an aider plugin for your favorite editor, | ||
please let me know by opening a | ||
[GitHub issue](https://github.com/paul-gauthier/aider/issues). |