Aider Commands & Prompt Reference
The in-chat commands of aider v0.86.2, the latest tagged release, checked against that release's command reference and source code, plus /ok, which the aider.chat docs already list although v0.86.2 lacks it. Commands start with a slash and any unambiguous prefix works, so /tok runs /tokens; ! sends a line to the shell. Command-line switches and the prompt's keybindings are left out. By default aider commits its own edits, so /diff and /undo act on those commits.
All Commands
Files in the chat (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /add | Add editable files | Takes paths or globs, offers to create a file that does not exist, and makes a read-only file editable. |
| /read-only | Add reference-only files | With no argument it turns every editable chat file read-only; naming a directory adds all files inside it. |
| /drop | Remove files from chat | With no names it empties the chat, keeping only read-only files given with --read when aider started. |
| /ls | List repo and chat files | Groups the output into repo files outside the chat, read-only files, and files in the chat. |
| /save | Save the file set | Writes a /drop line, then one /add or /read-only line per file, to the file name you give. |
| /load | Run commands from a file | Skips blank lines and lines starting with #, so a file written by /save restores that file set. |
Chat modes (7)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /code | Request code changes | Uses the main model's default edit format; with a prompt, only that message runs in code mode. |
| /ask | Discuss code without edits | Suits agreeing on a plan before editing; used alone it keeps ask mode on, shown in the prompt. |
| /architect | Plan with two models | The main model plans and the editor model writes the edits, applied without asking unless --no-auto-accept-architect is set. |
| /context | Find the files to edit | Context mode works out which files will need changes; with no prompt it becomes the active mode. |
| /help | Ask about using aider | Alone it lists the commands; the first question can install aider's help extras before answering. |
| /chat-mode | Change the active mode | Takes code, ask, architect, help or context, or an edit format name, and keeps it until changed. |
| /ok | Tell aider to go ahead | Handy after an /ask discussion; listed on aider.chat but missing from the v0.86.2 release. |
Models (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /model | Change the main model | Alone it shows the models in use; if the default edit format was active, the new model's default replaces it. |
| /editor-model | Change the editor model | The editor model turns architect proposals into file edits; the main and weak models stay as they are. |
| /weak-model | Change the weak model | The weak model writes commit messages and summarises chat history; switching it leaves the main model alone. |
| /models | Search model names | Give part of a model name to list the matches; with nothing typed it asks for that text. |
| /reasoning-effort | Set reasoning effort | Applies to the main model; run it without a value to see the current setting. |
| /think-tokens | Set thinking token budget | Applies to the main model; with no value it reports the budget currently in force. |
Git, shell and tests (8)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /diff | Show changes since last message | Compares with the commit from before your last message, so it shows what aider just committed. |
| /undo | Revert aider's last commit | Refuses when that commit is already pushed, came from outside this chat, or touches files with uncommitted changes. |
| /commit | Commit outside edits | Any text after the command becomes the commit message; it warns when there is nothing to commit. |
| /git | Run git directly | Sets GIT_EDITOR to true, so commands that would normally open an editor complete without one. |
| /run | Run a shell command | Asks before adding the output, showing its token size; if a failed run is added, a fix request is prefilled. |
| ! | Shell shortcut for /run | Type the shell command straight after the exclamation mark; it is handled exactly like /run. |
| /test | Run tests, keep failures | Without an argument it runs the --test-cmd command; output from a passing run is not added. |
| /lint | Lint and fix files | Asks before fixing each file with errors and commits pending changes first; needs a git repository. |
Context and history (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /tokens | Show token use and cost | Lists system messages, history, repo map and each file with its input cost, then the context window left. |
| /map | Print the repo map | Prints a notice instead when no repository map is available. |
| /map-refresh | Rebuild the repo map | Confirms when done and points you to /map to view the refreshed result. |
| /clear | Clear chat history | Files stay in the chat and only the conversation is emptied, unlike /reset. |
| /reset | Drop files and history | Combines /drop and /clear; read-only files given with --read at launch stay in the chat. |
| /copy-context | Copy context for a web chat | Ends the copied text with a request for edit-only answers, plus anything typed after the command. |
Writing prompts (9)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /editor | Write a prompt in an editor | Opens a markdown file; whatever you save is placed at the prompt to review before sending. |
| /edit | Short form of /editor | Behaves exactly like /editor, and text typed after either command starts the file. |
| /multiline-mode | Toggle multi-line input | Enter then adds a new line and Meta+Enter sends; the --multiline switch starts aider this way. |
| /paste | Paste from the clipboard | A clipboard image is saved as clipboard_image.png unless named, then added to the chat like a file. |
| /voice | Dictate a prompt | Needs an OpenAI API key for Whisper; the transcript lands at the prompt for editing. |
| /web | Add a webpage to the chat | Needs a URL; the page text joins the chat history rather than being added as a file. |
| /copy | Copy the last reply | On Linux it may need xclip or xsel; aider previews the first 50 characters it copied. |
| { ... } | Wrap a multi-line message | Put each brace on a line of its own, with the message lines between them. |
| {tag ... tag} | Tagged multi-line message | Pick a tag of letters or digits when the message itself contains a closing brace. |
Session (4)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /settings | Show current settings | Also lists metadata for the main, editor and weak models, such as context size and token costs. |
| /report | File a GitHub issue | Text after the command becomes the issue title; aider's version and model details go into the body. |
| /exit | Exit aider | Ends the session; to stop only the current reply, interrupt it with Ctrl + C instead. |
| /quit | Quit aider | Identical to /exit; both end the session straight away. |
Recipes
Our pairings of aider chat commands for planning, the architect flow, context control, commit history and saved working sets.
Plan in ask mode, then build
/ask → /code
Discuss the change with /ask until the plan is right, then send a short /code message such as "go ahead": the edits follow the plan agreed in ask mode. Builds newer than v0.86.2 add /ok, which sends that go-ahead for you.
Run the two-model architect flow
/editor-model → /architect
/editor-model picks the model that writes the file edits; /architect then sends the request, the main model proposes the change and the editor model applies it. The edits go in without a confirmation prompt unless aider was started with --no-auto-accept-architect.
Control exactly what the model sees
/add → /read-only → /drop → /tokens
/add puts files in the chat as editable, /read-only supplies reference files the model may read but not touch, /drop removes what is no longer needed, and /tokens shows what the current set costs.
Check and roll back aider's commits
/diff → /lint → /test → /undo
By default aider commits each change it makes, so /diff shows what the last reply changed, /lint and /test check it, and /undo removes that commit when the result is wrong. /commit is only needed for edits made outside the chat.
Persist a working set between sessions
/save → /load
/save writes the current file set out; /load restores it later, so a recurring task starts with the same editable and read-only files instead of rebuilding the chat by hand.
Frequently Asked Questions
How do I give Aider the right files to edit?
Use /add to bring files into the chat and /drop to remove them. Aider edits only what is in the chat, so a tight file set gives better results than adding the whole repository.
Can I undo a change Aider made?
Yes. Aider commits its edits to git, and /undo reverts the last Aider commit. /diff shows the change before you decide.
How do I hand Aider a failing test?
/test runs your configured test command, or the command typed after it, and adds the output to the chat when the run fails, so the next prompt can simply ask Aider to fix the failure it just saw.
Sources and checks
- Aider v0.86.2 docs: In-chat commands (commands.md at the v0.86.2 release tag) Command names and descriptions
- aider.chat: In-chat commands (current site, newer than v0.86.2) /ok, listed on the site but not in the v0.86.2 release
- Aider v0.86.2 docs: Entering multi-line chat messages (multi-line.md) Brace syntax for multi-line messages, /multiline-mode note
Every row on this page was matched to a line in the documentation above on . A command or parameter that could not be found there is not listed.
AI tools change their commands, parameters and model names between releases: the vendor's current documentation and the version you run have the last word. Found a wrong or missing entry? Tell us and it gets checked against the source. How we verify describes the process and its limits.
Related prompt references
Claude Code (157) · OpenAI Codex CLI (49) · Cursor (72) · All AI prompt references