Skip to main content

Aider AI Coding Assistant Cheatsheet

Aider is an open-source AI coding assistant that runs in the terminal, supports multiple LLM models (Claude, GPT-4o, DeepSeek, etc.), and features automatic Git integration, repository map awareness, and multi-file editing capabilities.

Updated: 2026-07-17·41 commands

Overview

Aider is an open-source AI coding assistant that runs in the terminal, supporting multiple LLM backends. It features automatic Git integration, repository map awareness, and concurrent multi-file editing — a powerful tool for local AI-assisted coding.

Quick Start

``bash # Install Aider pip install aider-chat

# Set up API Key (using Anthropic as example) export ANTHROPIC_API_KEY=your-key-here

# Start an Aider session aider

# Specify a model aider --model claude-sonnet-4-20250514

# Architect mode (two-model collaboration) aider --architect --model sonnet `

Refer to the command table below for detailed usage.

Launch Modes

Aider offers various launch modes: standard interactive, architect mode (dual-model), --ask (questions only, no edits), --yes (auto-confirm), --vim (Vim key bindings).

File Management

Use /add, /drop, /read-only to manage file context within the session. /ls lists all active files. /read-only marks files as read-only to prevent AI modification.

Chat Commands

Manage sessions with /help, /clear, /diff, /undo, /tokens, /model, and more. Supports /copy and /copy-context to duplicate content, /voice for speech input, /web to fetch web page content.

Code Editing

Supports multiple edit formats (--edit-format) including diff, udiff, search/replace. Combine with --lint and --test to automatically run linters and tests after edits.

Git Integration

Aider automatically manages Git commits, creating checkpoints before each modification. Use /commit for manual commits and /git to run custom Git commands. Enable with --git.

Advanced

Advanced commands include /run to execute shell commands, /voice for speech-to-code input, /web to fetch web page content for AI reference, /load and /save for session state management, /report for generating reports, and /exit to quit. The .aider.conf.yml` configuration file supports granular model parameters and environment settings.

Startup & Modes(9)

CommandLevel
aider
Start an Aider interactive session in current directory
Basic
aider --model
Specify which LLM model to use
Basic
aider --model sonnet
Use Claude Sonnet model
Basic
aider --model gpt-4o
Use OpenAI GPT-4o model
Basic
aider --model deepseek
Use DeepSeek model
Basic
aider --architect
Architect mode (dual-model collaboration)
Expert
aider --ask
Questions-only mode, no code modifications
Basic
aider --yes
Auto-confirm all AI-suggested edits
Intermediate
aider --vim
Enable Vim key binding mode
Intermediate

File Management(4)

CommandLevel
/add
Add files to the session context
Basic
/drop
Remove files from session context
Basic
/read-only
Add files as read-only (AI cannot modify)
Intermediate
/ls
List all active files in the current session
Basic

Chat Commands(8)

CommandLevel
/help
Show help for all available commands
Basic
/clear
Clear the session history display
Basic
/diff
Show diff of the most recent changes
Basic
/undo
Undo the most recent AI modification
Basic
/tokens
Show token usage statistics for current context
Intermediate
/model
Switch the model used in the current session
Intermediate
/copy
Copy last AI response to clipboard
Basic
/copy-context
Copy current session context to clipboard
Intermediate

Code Editing(6)

CommandLevel
/code
Describe code change requests in natural language
Basic
aider --edit-format
Specify edit format (diff/udiff/search-replace)
Expert
aider --lint
Auto-run linter after edits
Intermediate
/lint
Run linter on the current file
Intermediate
aider --test
Auto-run tests after edits
Intermediate
/test
Run the project's test suite
Intermediate

Git Integration(5)

CommandLevel
aider --git
Enable automatic Git integration (default: on)
Basic
aider --no-git
Disable automatic Git integration
Basic
aider --show-repo-map
Show the project's repository map
Intermediate
/commit
Manually commit current changes to Git
Basic
/git
Execute a custom Git command
Intermediate

Advanced(9)

CommandLevel
/run
Run a shell command in the terminal
Intermediate
/voice
Voice input mode (microphone required)
Intermediate
/web
Fetch web content and add to context
Intermediate
/load
Load a saved session state
Expert
/save
Save the current session state
Expert
/report
Report a bug or issue
Basic
/exit
Exit the Aider session
Basic
.aider.conf.yml
Aider configuration file (YAML format)
Intermediate
pip install aider-chat
Install Aider via pip
Basic

FAQ

This cheatsheet is compiled from official tool documentation. Last updated: 2026-07-17.