Skip to main content

Install and use Aider

Aider is an AI pair-programming tool for the terminal. AI-School recommends Aider for coding with students, because it works explicitly and is less agentic than many other coding agents.

The student receives programming help, while still clearly seeing which files are changed.

More information is available on the Aider website and in the official Aider documentation.

Install

You need Python before installing Aider. Install Python 3 from python.org or through a package manager such as Homebrew.

Then check whether Python is available.

macOS and Linux

python3 --version

On macOS and many Linux installations, the Python 3 command is python3 instead of python. This guide therefore uses python3.

Windows

py --version

On Windows, Python is usually started with py.

Install Aider

The recommended installation according to the Aider installation documentation is via aider-install.

macOS and Linux

python3 -m pip install aider-install
aider-install

On macOS and Linux, Aider can also be installed with an install script:

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

On Windows, use PowerShell:

py -m pip install aider-install
aider-install

Or use the install script:

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

Aider works best in a folder that is a git repository. Install git and preferably let students work in a project folder with version control.

Connect to Coding

Aider can work with OpenAI-compatible APIs. Use the Coding endpoint and the API key from AI-School.

macOS and Linux

export OPENAI_API_BASE="https://europe-west1-ai-school-pro.cloudfunctions.net/coderenOpenAiCompatibleApi/v1"
export OPENAI_API_KEY="ais.your-api-key"

Windows

setx OPENAI_API_BASE "https://europe-west1-ai-school-pro.cloudfunctions.net/coderenOpenAiCompatibleApi/v1"
setx OPENAI_API_KEY "ais.your-api-key"

After this, close the terminal and open a new terminal so Windows uses the new variables.

Start Aider

Go to your project folder:

cd path/to/your/project

Start Aider with an allowed model. For students, we recommend gpt-5.4-mini.

aider --model openai/gpt-5.4-mini

Advanced users can choose a stronger model:

aider --model openai/gpt-5.4

Work with files

In Aider, you can add files to the context:

/add src/main.py

Then ask for help, for example:

Can you explain why this function does not work?

Or:

Make the error message clearer for the user.

Useful commands

CommandMeaning
/add fileAdd a file to the chat
/askAsk questions without directly changing code
/codeAsk Aider to change code
/diffView the changes
/undoUndo the last AI change
/exitClose Aider

Classroom advice

Let students use Aider as programming help, not as an automatic solution machine.

Good assignments include:

  • “Explain what this error message means.”
  • “Which step should I investigate now?”
  • “Help me make this function smaller.”
  • “Check whether my solution is logical.”

Less suitable for beginners:

  • “Do the whole assignment for me.”
  • “Build the entire application.”
  • “Solve everything automatically.”