Aider Cheatsheet - Open-Source Terminal AI Pair Programming Full Reference

All Aider terminal AI pair-programming commands in one place — from install to model switching, file context to architect mode — organized by scenario. Copy and go.

AI CLI·53 commands·Last updated 2026-08-05
Back to AI CLI

Install & Start 5

pip install aider-chat
Install via pip (or pipx for isolation)
aider
Start interactive pair programming in a git repo
aider src/main.py tests/test_main.py
Start and add specific files to the chat
aider --model claude-sonnet-4-6
Set the main model
export ANTHROPIC_API_KEY="sk-ant-..."
Set the Anthropic key (OpenAI/DeepSeek/local also supported)

Model & Reasoning 7

aider --model ollama/codellama
Use a local Ollama model
aider --architect --model claude-opus --editor-model claude-sonnet
Architect mode: planner + editor dual models
aider --weak-model gpt-4o-mini
Set the weak model (for cheap subtasks)
aider --reasoning-effort high
Set reasoning effort (compatible models)
aider /think-tokens 4096
Set the per-turn thinking-token budget
/model
Switch the main model on the fly
/models
Search the available models list

Files & Context 9

/add src/auth/*.py
Add files to the chat (Aider can edit them)
/drop tests/auth/test_login.py
Remove files from the chat to save context
/read-only docs/api-spec.md
Read-only reference, edits blocked
/ls
List files known to the chat
/reset
Drop all files and clear history
/clear
Clear the visible chat history
aider --map-tokens 2048
Set the repo-map token budget
aider --show-repo-map
Print the current repo map and exit
/map-refresh
Force a repo-map refresh now

Chat Modes 5

/code
Code mode: edit code directly (default)
/ask
Ask mode: discuss without editing files
/architect
Architect mode: planner + editor dual-model flow
/chat-mode
Generic mode switcher
/context
Enter context browsing mode

Git & Run 10

/git status
Run a git command inside the session
/commit "Implement JWT auth"
Commit dirty changes manually
/undo
Revert the last git commit Aider made
/diff
Show the diff of recent changes
/run pytest tests/
Run a shell command, feed output to chat (alias !)
/test
Run the configured test command
/lint
Run the configured lint command
aider --auto-commits
Auto git-commit after each change
aider --lint-cmd "ruff check"
Auto-lint after edits
aider --test-cmd "pytest"
Auto-run tests after edits

Session & Tools 11

/voice
Voice input via Whisper (requires portaudio)
/web https://docs.site
Fetch a webpage as rendered text into chat
/paste
Paste image or text from the clipboard
/copy
Copy the last assistant reply to the clipboard
/copy-context
Copy chat context as markdown
/save /path/script.md
Save the session as a replayable script
/load /path/script.md
Load and run commands from a file
/settings
Print effective settings
/report
Open a pre-filled GitHub issue with diagnostics
/help
Aider answers questions about itself
/exit
Quit cleanly

Advanced 6

aider --message "/ask where is this bug"
Send a single non-interactive message (--message/-m)
aider --edit-format whole
Whole-file edits (more reliable for small files)
aider --cache-prompts
Enable prompt caching to cut cost and latency
/multiline-mode
Toggle multiline input mode
/vim
Toggle Vim key bindings
/editor
Open $EDITOR to write a long prompt

💡 Tips

  • Auto git-commit per change is Aider's killer feature: pair it with `--test-cmd` and `--lint-cmd`, and a bad edit is one `/undo` away.
  • For complex refactors use `/architect` dual models: a planner proposes, an editor emits diffs — higher quality than single-model end-to-end and usually cheaper.
  • Add only relevant files (3-5 per task), then `/drop` when done; smaller chats are faster, cheaper, and edit more precisely.
  • Use `/ask` first to let Aider plan before editing — figuring it out upfront avoids detours on complex tasks.

Official References

Commands are compiled from the official docs below. Click to verify the latest usage.

Maintained by LaoHand

Publicly updated on Aug 5, 2026, continuously proofread against official docs.

Found an error? Report it

Wrong command or description? Open an issue to help us fix it.

Found an error? Report it