Skip to main content
← All setup guides

Aider · Setup guide

How to set up Aider

Install Aider with the official installer, put an API key in your environment, open a git repository in Terminal, and start with a small documented change that Aider can commit as a reviewable diff.

Aider

terminal · checked August 8, 2026

~12 minIntermediate

The “Open Aider” link goes to the vendor site. It is not an affiliate-tracked link on this page — no commission is claimed for that click. Affiliate disclosure.

Critical: finish install before closing the window

Keep the installer terminal open until you see a success message. If you used an admin window, do not close it until verification works. Then open a new Terminal or PowerShell window and run the verify step — PATH updates rarely apply to shells that were already open, especially on Windows.

Before you begin

  • macOS, Linux, or Windows.
  • Git installed (Aider expects a git repository).
  • Python 3.8+ if you use aider-install, or use the curl / PowerShell one-liners (official path — avoid Homebrew/AUR packages that pull wrong deps).
  • An API key from Anthropic, OpenAI, DeepSeek, or another supported provider.

Authentication

Provider API key via environment variable or --api-key flag

Account: API key from a supported model provider

Never commit API keys. Prefer environment variables in your shell profile or a local .env that stays out of git. For local Ollama, use the ollama_chat/model prefix in Aider (not bare ollama/) — for example ollama_chat/qwen2.5-coder. Set adequate context with OLLAMA_CONTEXT_LENGTH or num_ctx in the model Modelfile. Ollama listens on port 11434 by default.

Install or open it

1. Get the harness ready

These steps are written for beginners. On Mac, Terminal is the black/white text window where you type commands. On Windows, use PowerShell or Terminal. Use the OS tabs to hide steps that are not for your computer, then copy one command at a time.

  1. 01

    Open Terminal on a Mac

    Mac

    Click the Spotlight search icon (magnifying glass) at the top-right of the menu bar, or press Command (⌘) + Space. Type Terminal and press Return. A text window opens — that is where you paste the install commands below. Leave it open.

  2. 02

    Open Terminal or PowerShell on Windows

    Windows

    Press the Windows key, type Terminal or PowerShell, then press Enter. Use that window for the commands below. If Windows asks for permission to run a script or install software, read the prompt before approving.

  3. 03

    How to paste a command

    Copy one command at a time from this page. Click inside the terminal window, paste (Mac: ⌘+V, Windows: Ctrl+V or right-click → Paste), then press Return / Enter. Wait until the prompt comes back before running the next command. You do not need to type the leading $ if you see one in other docs.

  4. 04

    Do not close the installer until verified

    Keep the installer terminal (or admin PowerShell) open until the install finishes without errors. Closing early can leave a half-written binary or an incomplete PATH update — especially on Windows.

  5. 05

    Open a new terminal after installers

    PATH updates often only apply to new shells — especially on Windows. Do not close the install session until the installer finishes, then open a fresh Terminal/PowerShell before running --version checks.

  6. 06

    Inspect before you pipe an installer

    Commands like curl … | bash download and run a script immediately. Prefer the official package manager when offered. If you use a curl installer, you can download the script first, open it in a text editor, then run it — never paste installers from random blogs.

  7. 07

    Install Aider on Mac / Linux (recommended one-liner)

    Mac

    Paste this into Terminal. It installs Aider (and Python 3.12 via uv if needed) without cluttering your system Python. When it finishes, close Terminal and open a new window.

    bash
    curl -LsSf https://aider.chat/install.sh | sh

    You should see: The installer finishes without an error. Open a new terminal before the verify step so PATH updates apply.

    If this fails
    • The install command errors, or the next verify step says “command not found”. Re-run the official install command with network access, then open a brand-new terminal window before verifying.
    Aider installation
  8. 08

    Install Aider on Windows (PowerShell)

    Windows

    Paste this into PowerShell. After it finishes, close the window and open a new PowerShell or Terminal session so the PATH updates.

    powershell
    powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex"

    You should see: The installer finishes without an error. Open a new terminal before the verify step so PATH updates apply.

    If this fails
    • The install command errors, or the next verify step says “command not found”. Re-run the official install command with network access, then open a brand-new terminal window before verifying.
    Aider installation
  9. 09

    Alternative: aider-install if you already have Python

    If python --version already works, you can use the official two-step installer instead of the curl script.

    bash
    python -m pip install aider-install && aider-install

    You should see: The installer finishes without an error. Open a new terminal before the verify step so PATH updates apply.

    If this fails
    • The install command errors, or the next verify step says “command not found”. Re-run the official install command with network access, then open a brand-new terminal window before verifying.
    aider-install
  10. 10

    Verify Aider

    You should see a version number. If you get “command not found”, open a brand-new terminal and try again.

    bash
    aider --version

    You should see: Aider’s version. Open a new terminal after install; run uv tool update-shell if PATH still misses it.

    If this fails
    • aider: command not found after install. Open a new terminal. If it still fails, re-run the installer and follow any PATH instructions it prints (uv tool update-shell is common). On Windows, close and reopen PowerShell after install.ps1 so PATH refreshes.
  11. 11

    Skip unofficial package managers

    Do not install Aider via Homebrew or AUR for production use — official docs warn those packages can ship wrong dependencies. Prefer the curl/PowerShell installer or aider-install.

Repository or project

2. Start in the right place

Keep the first repository small, clean, and easy to roll back while you learn the harness’s permissions and context model.

  1. 01

    Go to your project folder

    In Terminal, use cd to enter the project. On Mac, you can type cd (with a space), then drag the folder from Finder into the Terminal window and press Return.

    bash
    cd path/to/your-repository

    You should see: The prompt shows you are inside the intended folder (check with `pwd`).

    If this fails
    • “No such file or directory” or you are still in your home folder. Create or clone the practice folder first, then `cd` into it before starting the tool.
  2. 02

    Confirm it is a git repo

    Aider works best inside git. If this fails, run git init only on a disposable practice folder — not on a production deploy directory.

    bash
    git status

    You should see: The prompt shows you are inside the intended folder (check with `pwd`).

    If this fails
    • “No such file or directory” or you are still in your home folder. Create or clone the practice folder first, then `cd` into it before starting the tool.
  3. 03

    Set a key for this session (example: Anthropic on Mac/Linux)

    Mac

    Replace the placeholder with your real key. This only lasts for the current Terminal window unless you add it to your shell profile. ChatGPT Plus is not an OpenAI API key.

    bash
    export ANTHROPIC_API_KEY="your-key-here"

    You should see: The tool starts in this folder and waits for your first prompt (or shows a short first-run / sign-in screen).

    If this fails
    • Nothing happens, or you land in the wrong folder. Confirm you are inside the practice repo (`pwd`), that you signed in, and that you opened a new terminal after install.
  4. 04

    Set a key for this session (Windows PowerShell)

    Windows

    Session-only: set the variable in PowerShell. For a durable key, use setx then open a new shell — or put the key in a gitignored .env.

    powershell
    $env:ANTHROPIC_API_KEY = "your-key-here"

    You should see: The tool starts in this folder and waits for your first prompt (or shows a short first-run / sign-in screen).

    If this fails
    • Nothing happens, or you land in the wrong folder. Confirm you are inside the practice repo (`pwd`), that you signed in, and that you opened a new terminal after install.
  5. 05

    Commit or stash your own work first

    Aider may auto-commit preexisting dirty work before AI edits. Start from a clean tree, or launch with --no-auto-commits for the first session.

  6. 06

    Start Aider (review-first)

    Default Aider applies edits to disk and auto-commits. For a first session, disable auto-commits so you review with git diff, then /commit when ready.

    bash
    aider --no-auto-commits

    You should see: The tool starts in this folder and waits for your first prompt (or shows a short first-run / sign-in screen).

    If this fails
    • Nothing happens, or you land in the wrong folder. Confirm you are inside the practice repo (`pwd`), that you signed in, and that you opened a new terminal after install.
    Aider usage
  7. 07

    Optional: local Ollama instead of cloud APIs

    Run ollama serve (default port 11434), pull a coding model, then start Aider with the ollama_chat/ prefix — for example aider --model ollama_chat/qwen2.5-coder --no-auto-commits. Set OLLAMA_CONTEXT_LENGTH or Modelfile num_ctx high enough for repo maps (often 16–32k+).

    Aider + Ollama

First run

One small documented fix with --no-auto-commits

Use this task to test the workflow before handing over a larger repository or production responsibility.

  1. 01Start with aider --no-auto-commits and /add only one small file (for example README.md).
  2. 02Ask for a docstring or comment-only improvement.
  3. 03Run git diff, then /commit (or enable auto-commits later). If a bad edit lands, use /undo.

Why this is safe: Disabling auto-commit restores a review gate; a docs-only first change proves the loop without behaviour risk.

Stop and review if

  • Aider stages secrets, lockfiles, or unrelated directories.
  • Aider auto-committed your preexisting dirty local work.
  • You cannot run the project’s tests after the change.

The operating boundary

Privacy, data, and cost

The setup is incomplete until you know what the harness can see, what account pays for it, and who approves a risky action.

Privacy

Aider itself does not train on your code. Selected chat files plus a repository map (paths, symbols, key definition lines) go to whichever LLM provider you configure — or stay local if you use a local model.

Training on code: no

Determined by the upstream LLM provider, not by Aider itself.

Sensitive repos: Use a practice clone, avoid adding .env or credential files to the chat, and keep keys in the environment.

Pricing

Aider is free open-source software; you pay your model provider for tokens.

Model: usage based

Watch out: Large /add sets and long chat history increase token cost quickly.

Estimate a seat stack

When setup goes wrong

  • aider: command not found after install.

    Open a new terminal. If it still fails, re-run the installer and follow any PATH instructions it prints (uv tool update-shell is common). On Windows, close and reopen PowerShell after install.ps1 so PATH refreshes.

  • Authentication or 401 errors from the model.

    Confirm the environment variable name matches the provider, that the key has credits, and that you exported it in the same terminal session.

  • Aider complains it is not in a git repository.

    cd into the correct project folder and run git status. Initialise git only on disposable practice projects.

  • Local Ollama model fails or context truncates mid-session.

    Confirm ollama serve on port 11434, use ollama_chat/model (not ollama/model), and raise OLLAMA_CONTEXT_LENGTH or Modelfile num_ctx before retrying.

Next steps

After the first successful run

Keep the pilot small, then compare surfaces and budget before a team rollout.

Setup details change quickly. The page was checked August 8, 2026; use the official source below before installing in a managed or production environment.