Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Aider Commands Handout


Owner: Vadim Rudakov, lefthand67@gmail.com
Version: 0.2.0
Birth: 2025-11-18
Last Modified: 2026-01-13


Aider is an AI pair programmer that uses your code as context.

1. Installation and Setup

commanddescription
Installation
uv tool install aider-chatinstall aider with uv (faster)
pipx install aider-chatinstall aider with pipx (traditional way)
uv tool install aider-chat[browser]install browser extension (experimental feature)
aider -hshow help message and exit
aider --versionShow the version number and exit
Configuration files
/path/to/project/.aider.conf.ymlpoject level file
$HOME/.aider.conf.ymluser level file
-c /path/to/.aider.conf.ymlspecific file, i.e. project level
Essential Configuration Flags
--model MODELSpecify the LLM to use
--light-modeUse colors suitable for a light terminal background (default: False), env var: AIDER_LIGHT_MODE
--auto-commits, --no-auto-commitsEnable/disable auto commit of LLM changes (default: True) env var: AIDER_AUTO_COMMITS

Args that start with -- can be set in a config file. The config file uses YAML syntax and must represent a YAML ‘mapping’ (for details, see http://learn.getgrav.org/advanced/yaml).

2. Using proxy

If your organization requires all external traffic to be routed through the proxy, you can set these environment variables and pass them to the terminal session before starting the aider:

export HTTPS_PROXY="http://[user:password]@proxy_ip_address:port"
export https_proxy="http://[user:password]@proxy_ip_address:port"

You should NOT set HTTP_PROXY variable because it breaks the connection between the aider and local ollama through http://127.0.0.1:11434.

You can wrap this configuration into a script wrapper aider_proxy.sh:

#!/bin/bash
set -euo pipefail


main() {

    export HTTPS_PROXY="http://[user:password]@proxy_ip_address:port"
    export https_proxy="http://[user:password]@proxy_ip_address:port"

    exec aider "$@"
}


main "$@"

Make this script executable and add it to your PATH. Now you can run aider simply:

$ aider_proxy.sh --model gemini/gemini-3-flash

Avoid using proxy if it’s not necessary for it adds complexity to the aider configuration.

3. Running & Basic Usage

Launching aider

commanddescription
aider --model ollama_chat/<model_name>run a local model in terminal (get name from ollama ls)
--gui, --no-gui, --browser, --no-browserRun aider in your browser (default: False); env var: AIDER_GUI
aider --list-models gemini/list available models

Core File Management

CommandDescription
--file FILEspecify a file to edit (can be used multiple times); env var: AIDER_FILE
--read FILEspecify a read-only file (can be used multiple times); env var: AIDER_READ
/addAdd files to the chat so aider can edit them or review them in detail.
/tokensReport on the number of tokens used by the current chat context

Using the Repository Map

commanddescription
--map-tokens NUMLimit the size of the Repository Map in tokens (e.g., aider --map-tokens 500).
/mapDisplay the current Repository Map summary.

The Repository Map provides a structural overview (file/function) of your project, helping the AI understand context without loading the entire codebase, thus saving tokens. Use --map-tokens to manage this resource (default is 1024 tokens).

In-Chat Commands

commanddescription
/helpAsk questions about Aider’s features and usage. Aider’s help is context-aware, i.e. it can answer questions about itself.
/clearClear the chat history (saves tokens).
/run COMMANDRun an arbitrary shell command and share the output with the LLM.
/undoUndo the last Git commit (only works for Aider’s auto-commits).
/web URLScrape a webpage, convert to markdown and send in a message.
/diffShow the difference between the current files and the last Aider commit.
/commit MESSAGEManually commit the current changes with a specific message.
/exit or /quitExit Aider.

4. Upgrading

commanddescription
uv tool --upgrade aider-chat aider-chat[browser]
aider --install-main-branchInstall the latest version from the main branch; env var: AIDER_INSTALL_MAIN_BRANCH. Use for beta features only.
aider --upgrade, --updateUpgrade aider to the latest version from PyPI; env var: AIDER_UPGRADE