diff --git a/README.md b/README.md index 5c9bc74b8..d37646c11 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,15 @@ You can find more chat transcripts on the [examples page](https://aider.chat/exa ## Installation 1. Install the package: - * PyPI: `pip install aider-chat` - * GitHub: `pip install git+https://github.com/paul-gauthier/aider.git` - * Local clone: `pip install -e .` + * PyPI: `python -m pip install aider-chat` + * GitHub: `python -m pip install git+https://github.com/paul-gauthier/aider.git` + * Local clone: `python -m pip install -e .` 2. Set up your OpenAI API key: - * As an environment variable: `export OPENAI_API_KEY=sk-...` - * Or, by including `openai-api-key: sk-...` in an `.aider.config.yml` file + * As an environment variable: + * `export OPENAI_API_KEY=sk-...` on Linux or Mac + * `setx OPENAI_API_KEY sk-...` in Windows PowerShell + * Or include `openai-api-key: sk-...` in an `.aider.config.yml` file in your current directory or at the root of your git repo, alongside the `.git` dir. 3. Optionally, install [universal ctags](https://github.com/universal-ctags/ctags). This 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. * The `ctags` command needs to be on your shell path so that it will run by default when aider invokes `ctags ...`. diff --git a/aider/main.py b/aider/main.py index 8b6430fe8..2384880e6 100644 --- a/aider/main.py +++ b/aider/main.py @@ -251,7 +251,12 @@ def main(args=None, input=None, output=None): io.tool_output(*sys.argv, log_only=True) if not args.openai_api_key: - io.tool_error("No OpenAI API key provided. Use --openai-api-key or env OPENAI_API_KEY.") + if os.name == "nt": + io.tool_error( + "No OpenAI API key provided. Use --openai-api-key or setx OPENAI_API_KEY." + ) + else: + io.tool_error("No OpenAI API key provided. Use --openai-api-key or env OPENAI_API_KEY.") return 1 main_model = models.Model(args.model)