diff --git a/README.md b/README.md index f5d2f53f9..18e9e731e 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ aider --model gpt-4o --openai-api-key your-key-goes-here See the -[installation instructions](https://aider.chat/docs/install.html) -and other -[documentation](https://aider.chat/docs/usage.html) +[installation instructions](https://aider.chat/docs/install/install.html) +and +[usage documentation](https://aider.chat/docs/usage.html) for more details. ## Features diff --git a/aider/website/_includes/conflicts.md b/aider/website/_includes/conflicts.md index 8a624d73c..c5f0658f4 100644 --- a/aider/website/_includes/conflicts.md +++ b/aider/website/_includes/conflicts.md @@ -9,7 +9,7 @@ or If you are using aider to work on a python project, sometimes your project will require specific versions of python packages which conflict with the versions that aider requires. -If this happens, the `python -m pip install aide-chat` command may return errors like these: +If this happens, the `python -m pip install aider-chat` command may return errors like these: ``` aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible. diff --git a/aider/website/_includes/get-started.md b/aider/website/_includes/get-started.md index bcc074270..65c666e83 100644 --- a/aider/website/_includes/get-started.md +++ b/aider/website/_includes/get-started.md @@ -1,5 +1,5 @@ -You can get started quickly like this: +You can get started quickly like this, with python 3.8-3.13: ```bash python -m pip install aider-install diff --git a/aider/website/_includes/special-keys.md b/aider/website/_includes/special-keys.md index 24e97bf74..8b1378917 100644 --- a/aider/website/_includes/special-keys.md +++ b/aider/website/_includes/special-keys.md @@ -1,49 +1 @@ -Aider has special support for providing -OpenAI and Anthropic API keys -via dedicated -[command line switches](/docs/config/options.html#api-keys-and-settings) -`--openai-api-key` and `--anthropic-api-key`. - -You can also set those API keys via special entries in the -[yaml config file](/docs/config/aider_conf.html), like this: - -```yaml -openai-api-key: -anthropic-api-key: -``` - -All other LLM providers can use one of the following methods to set their -keys: - -### API keys on the command line -{: .no_toc } - -Use `--api-key provider=` which has the effect of setting the environment variable `PROVIDER_API_KEY=`. So `--api-key gemini=xxx` would set `GEMINI_API_KEY=xxx`. - -### API keys in a .env file -{: .no_toc } - -The [.env file](/docs/config/dotenv.html) -is a great place to set API keys and other provider API environment variables: - -```bash -GEMINI_API_KEY=foo -OPENROUTER_API_KEY=bar -DEEPSEEK_API_KEY=baz -``` - -### API keys in .aider.conf.yml -{: .no_toc } - -Or you can set API keys in the -[`.aider.conf.yml` file](/docs/config/aider_conf.html) -via the `api-key` entry: - -``` -api-key: -- gemini=foo # Sets env var GEMINI_API_KEY=foo -- openrouter=bar # Sets env var OPENROUTER_API_KEY=bar -- deepseek=baz # Sets env var DEEPSEEK_API_KEY=baz -``` - diff --git a/aider/website/_includes/venv-pipx.md b/aider/website/_includes/venv-pipx.md deleted file mode 100644 index bb344dbd8..000000000 --- a/aider/website/_includes/venv-pipx.md +++ /dev/null @@ -1,5 +0,0 @@ -{: .tip } -Other recommended ways to install aider are via -[pipx](/docs/install/pipx.html) -or -[uv](/docs/install/uv.html). diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index abb509a33..e70d48856 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -5,41 +5,78 @@ nav_order: 20 description: How to install and get started pair programming with aider. --- -# Quick start +# Installation +{: .no_toc } + + +## Get started quickly with aider-install {% include get-started.md %} -Or see the -[full installation instructions](/docs/install/install.html) -for more details, -or the -[usage instructions](https://aider.chat/docs/usage.html) to start coding with aider. +There are some [optional install steps](/docs/install/optional.html) you could consider. +See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider. -{% include venv-pipx.md %} +## Install with uv -
- -
+A recommended way to install aider is with uv: - +You can use uv to install aider with your existing python versions 3.8-3.13. +If needed, it will automatically install python3.12 to use with aider. + +Also see the +[docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/). + +## Install with pipx + +A recommended way to install aider is with pipx: + +```bash +python -m pip install pipx # If you need to install pipx +pipx install aider-chat +``` + +You can use pipx to install aider with python versions 3.9-3.12. + +Also see the +[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/). +### pipx on replit + +{% include replit-pipx.md %} + +## Install with pip + +You can directly install aider with pip, but one of the above +methods is usually safer. +If you do install with pip, you should consider +using a +[virtual environment](https://docs.python.org/3/library/venv.html) +to keep aider's dependencies separated. + + +You can use pip to install aider with python versions 3.9-3.12. + +```bash +# Install aider +python -m pip install -U --upgrade-strategy only-if-needed aider-chat + +# To work with GPT-4o: +aider --4o --openai-api-key sk-xxx... + +# To work with Claude 3.5 Sonnet: +aider --sonnet --anthropic-api-key sk-xxx... +``` + +{% include python-m-aider.md %} + +## You are done! + +There are some [optional install steps](/docs/install/optional.html) you could consider. +See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider. diff --git a/aider/website/docs/install/install.md b/aider/website/docs/install/install.md deleted file mode 100644 index afe31cb4e..000000000 --- a/aider/website/docs/install/install.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -parent: Installation -nav_order: 10 ---- - -# Installing aider -{: .no_toc } - -## Python version - -Aider currently works with python 3.9-3.12. - -{% include venv-pipx.md %} - -## Mac/Linux install - -```bash -# Install aider -python -m pip install -U --upgrade-strategy only-if-needed aider-chat - -# To work with GPT-4o: -aider --4o --openai-api-key sk-xxx... - -# To work with Claude 3.5 Sonnet: -aider --sonnet --anthropic-api-key sk-xxx... -``` - -## Windows install - -```bash -# Install aider -python -m pip install -U --upgrade-strategy only-if-needed aider-chat - -# To work with GPT-4o: -aider --4o --openai-api-key sk-xxx... - -# To work with Claude 3.5 Sonnet: -aider --sonnet --anthropic-api-key sk-xxx... -``` - -{% include python-m-aider.md %} - -## Install git - -Make sure you have git installed. -Here are -[instructions for installing git in various environments](https://github.com/git-guides/install-git). - -## Get your API key - -To work with OpenAI's models like GPT-4o or GPT-3.5 you need a paid -[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key). -Note that this is different than being a "ChatGPT Plus" subscriber. - -To work with Anthropic's models like Claude 3.5 Sonnet you need a paid -[Anthropic API key](https://docs.anthropic.com/claude/reference/getting-started-with-the-api). - - -## Working with other LLMs - -{% include works-best.md %} - -## You are done! - -There are some [optional install steps](/docs/install/optional.html) you could consider. -See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider. - diff --git a/aider/website/docs/install/optional.md b/aider/website/docs/install/optional.md index 8e4285873..34584cb0f 100644 --- a/aider/website/docs/install/optional.md +++ b/aider/website/docs/install/optional.md @@ -11,10 +11,29 @@ The steps below are completely optional. - TOC {:toc} +## Install git -## Store your api keys +Aider works best if you have git installed. +Here are +[instructions for installing git in various environments](https://github.com/git-guides/install-git). -You can [store your api keys in a .env file](/docs/config/dotenv.html) +## Get your API key + +To work with OpenAI's models like GPT-4o or o1-preview you need a paid +[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key). +Note that this is different than being a "ChatGPT Plus" subscriber. + +To work with Anthropic's models like Claude 3.5 Sonnet you need a paid +[Anthropic API key](https://docs.anthropic.com/claude/reference/getting-started-with-the-api). + + +### Working with other LLMs + +{% include works-best.md %} + +### Store your api keys + +You can [store your api keys in configuration or env files](/docs/config/api-keys.html) and they will be loaded automatically whenever you run aider. ## Enable Playwright diff --git a/aider/website/docs/install/pipx.md b/aider/website/docs/install/pipx.md deleted file mode 100644 index 4c061530c..000000000 --- a/aider/website/docs/install/pipx.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -parent: Installation -nav_order: 100 ---- - -# Install with pipx - -A recommended way to install aider is with pipx: - -```bash -python -m pip install pipx # If you need to install pipx -pipx install aider-chat -``` - -See also the -[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/). - - -## pipx on replit - -{% include replit-pipx.md %} - - -{% include conflicts.md %} diff --git a/aider/website/docs/install/uv.md b/aider/website/docs/install/uv.md deleted file mode 100644 index c8fe62b21..000000000 --- a/aider/website/docs/install/uv.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -parent: Installation -nav_order: 100 ---- - -# Install with uv - -A recommended way to install aider is with uv: - -```bash -python -m pip install uv # If you need to install uv -uv tool install --python python3.12 aider-chat -``` - -See also the -[docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/). - -{% include conflicts.md %} diff --git a/aider/website/docs/troubleshooting/aider-not-found.md b/aider/website/docs/troubleshooting/aider-not-found.md index 12a610340..29ef7c3aa 100644 --- a/aider/website/docs/troubleshooting/aider-not-found.md +++ b/aider/website/docs/troubleshooting/aider-not-found.md @@ -14,12 +14,11 @@ You may see an error message like this: > aider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. -Below is the most fail safe way to install and run aider in these situations: +Below is the most fail safe way to run aider in these situations: ``` -python -m pip install -U aider-chat python -m aider ``` - -{% include venv-pipx.md %} +You should also consider +[installing aider using aider-install, uv or pipx](/docs/install.html). diff --git a/aider/website/docs/troubleshooting/imports.md b/aider/website/docs/troubleshooting/imports.md index ac9e96791..8fa05c7e4 100644 --- a/aider/website/docs/troubleshooting/imports.md +++ b/aider/website/docs/troubleshooting/imports.md @@ -5,7 +5,7 @@ nav_order: 28 # Dependency versions -Aider expects to be installed via `pip` or `pipx`, which will install +Aider expects to be installed with the correct versions of all of its required dependencies. If you've been linked to this doc from a GitHub issue, @@ -13,43 +13,26 @@ or if aider is reporting `ImportErrors` it is likely that your aider install is using incorrect dependencies. -## Install with pipx +## Install with aider-install, uv or pipx If you are having dependency problems you should consider -[installing aider using pipx](/docs/install/pipx.html). +[installing aider using aider-install, uv or pipx](/docs/install.html). This will ensure that aider is installed in its own python environment, with the correct set of dependencies. -Try re-installing cleanly: - -``` -pipx uninstall aider-chat -pipx install aider-chat -``` - ## Package managers like Homebrew, AUR, ports Package managers often install aider with the wrong dependencies, leading to import errors and other problems. -The recommended way to -install aider is with -[pip](/docs/install/install.html). -Be sure to use the `--upgrade-strategy only-if-needed` switch so that the correct -versions of dependencies will be installed. +It is recommended to +[install aider using aider-install, uv or pipx](/docs/install.html). -``` -python -m pip install -U --upgrade-strategy only-if-needed aider-chat -``` - -A very safe way is to -[install aider using pipx](/docs/install/pipx.html), -which will ensure it is installed in a stand alone virtual environment. ## Dependency versions matter Aider pins its dependencies and is tested to work with those specific versions. -If you are installing aider with pip (rather than pipx), +If you are installing aider directly with pip you should be careful about upgrading or downgrading the python packages that aider uses. @@ -64,9 +47,4 @@ and sometimes introduces bugs or backwards incompatible changes. ## Replit -You can `pip install -U aider-chat` on replit. - -Or you can install aider with -pipx as follows: - {% include replit-pipx.md %}