Skip to main content

Installing and Using Aider

Aider is an AI pair-programming tool for the terminal. AI-School recommends Aider for coding with students, because the tool is explicit in its actions and less agentic than many other coding agents.

The student gets help with programming but can clearly see which files are being modified.

More information can be found on the Aider website and in the official Aider documentation.

Install​

You first need Python for Aider. Install Python 3 via python.org or via a package manager such as Homebrew.

Then check that Python is available.

macOS and Linux​

python3 --version

On macOS and many Linux installations the Python 3 command is python3 instead of python. Therefore, in this guide always use python3.

Windows​

py --version

On Windows Python is usually started with py.

Installing 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 this can be done via PowerShell:

py -m pip install aider-install
aider-install

Or with the install script:

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

Aider works best in a directory that is a git repository. Therefore also install git and preferably have students work in a project folder with version control.

Connecting to Coding​

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

macOS and Linux​

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

Windows​

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

Then close the terminal and open a new one so Windows uses the new variables.

Starting Aider​

Go to your project folder:

cd path/to/your/project

Start Aider with an allowed model. For students we recommend gpt-5.6-luna.

aider --model openai/gpt-5.6-luna

For advanced users a stronger model can be chosen:

aider --model openai/gpt-5.6-terra

Working 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 isn’t working?

Or:

Make the error message clearer for the user.

Handy commands​

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

Advice for the classroom​

Have students use Aider as programming assistance, not as an automatic solution machine.

Good prompts include, for example:

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

Less suitable for beginners:

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