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.
Back to AI CLIInstall & Start 5
pip install aider-chatInstall via pip (or pipx for isolation)
aiderStart interactive pair programming in a git repo
aider src/main.py tests/test_main.pyStart and add specific files to the chat
aider --model claude-sonnet-4-6Set the main model
export ANTHROPIC_API_KEY="sk-ant-..."Set the Anthropic key (OpenAI/DeepSeek/local also supported)
Model & Reasoning 7
aider --model ollama/codellamaUse a local Ollama model
aider --architect --model claude-opus --editor-model claude-sonnetArchitect mode: planner + editor dual models
aider --weak-model gpt-4o-miniSet the weak model (for cheap subtasks)
aider --reasoning-effort highSet reasoning effort (compatible models)
aider /think-tokens 4096Set the per-turn thinking-token budget
/modelSwitch the main model on the fly
/modelsSearch the available models list
Files & Context 9
/add src/auth/*.pyAdd files to the chat (Aider can edit them)
/drop tests/auth/test_login.pyRemove files from the chat to save context
/read-only docs/api-spec.mdRead-only reference, edits blocked
/lsList files known to the chat
/resetDrop all files and clear history
/clearClear the visible chat history
aider --map-tokens 2048Set the repo-map token budget
aider --show-repo-mapPrint the current repo map and exit
/map-refreshForce a repo-map refresh now
Chat Modes 5
/codeCode mode: edit code directly (default)
/askAsk mode: discuss without editing files
/architectArchitect mode: planner + editor dual-model flow
/chat-modeGeneric mode switcher
/contextEnter context browsing mode
Git & Run 10
/git statusRun a git command inside the session
/commit "Implement JWT auth"Commit dirty changes manually
/undoRevert the last git commit Aider made
/diffShow the diff of recent changes
/run pytest tests/Run a shell command, feed output to chat (alias !)
/testRun the configured test command
/lintRun the configured lint command
aider --auto-commitsAuto 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
/voiceVoice input via Whisper (requires portaudio)
/web https://docs.siteFetch a webpage as rendered text into chat
/pastePaste image or text from the clipboard
/copyCopy the last assistant reply to the clipboard
/copy-contextCopy chat context as markdown
/save /path/script.mdSave the session as a replayable script
/load /path/script.mdLoad and run commands from a file
/settingsPrint effective settings
/reportOpen a pre-filled GitHub issue with diagnostics
/helpAider answers questions about itself
/exitQuit cleanly
Advanced 6
aider --message "/ask where is this bug"Send a single non-interactive message (--message/-m)
aider --edit-format wholeWhole-file edits (more reliable for small files)
aider --cache-promptsEnable prompt caching to cut cost and latency
/multiline-modeToggle multiline input mode
/vimToggle Vim key bindings
/editorOpen $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