Aider Commands & Prompt Reference

46 commands & parameters · 7 categories · Sources: Aider v0.86.2 docs: In-chat commands (commands.md at the v0.86.2 release tag) and 2 more · Checked

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 / SyntaxWhat it doesNotes
/addAdd editable filesTakes paths or globs, offers to create a file that does not exist, and makes a read-only file editable.
/read-onlyAdd reference-only filesWith no argument it turns every editable chat file read-only; naming a directory adds all files inside it.
/dropRemove files from chatWith no names it empties the chat, keeping only read-only files given with --read when aider started.
/lsList repo and chat filesGroups the output into repo files outside the chat, read-only files, and files in the chat.
/saveSave the file setWrites a /drop line, then one /add or /read-only line per file, to the file name you give.
/loadRun commands from a fileSkips blank lines and lines starting with #, so a file written by /save restores that file set.

Chat modes (7)

Command / SyntaxWhat it doesNotes
/codeRequest code changesUses the main model's default edit format; with a prompt, only that message runs in code mode.
/askDiscuss code without editsSuits agreeing on a plan before editing; used alone it keeps ask mode on, shown in the prompt.
/architectPlan with two modelsThe main model plans and the editor model writes the edits, applied without asking unless --no-auto-accept-architect is set.
/contextFind the files to editContext mode works out which files will need changes; with no prompt it becomes the active mode.
/helpAsk about using aiderAlone it lists the commands; the first question can install aider's help extras before answering.
/chat-modeChange the active modeTakes code, ask, architect, help or context, or an edit format name, and keeps it until changed.
/okTell aider to go aheadHandy after an /ask discussion; listed on aider.chat but missing from the v0.86.2 release.

Models (6)

Command / SyntaxWhat it doesNotes
/modelChange the main modelAlone it shows the models in use; if the default edit format was active, the new model's default replaces it.
/editor-modelChange the editor modelThe editor model turns architect proposals into file edits; the main and weak models stay as they are.
/weak-modelChange the weak modelThe weak model writes commit messages and summarises chat history; switching it leaves the main model alone.
/modelsSearch model namesGive part of a model name to list the matches; with nothing typed it asks for that text.
/reasoning-effortSet reasoning effortApplies to the main model; run it without a value to see the current setting.
/think-tokensSet thinking token budgetApplies to the main model; with no value it reports the budget currently in force.

Git, shell and tests (8)

Command / SyntaxWhat it doesNotes
/diffShow changes since last messageCompares with the commit from before your last message, so it shows what aider just committed.
/undoRevert aider's last commitRefuses when that commit is already pushed, came from outside this chat, or touches files with uncommitted changes.
/commitCommit outside editsAny text after the command becomes the commit message; it warns when there is nothing to commit.
/gitRun git directlySets GIT_EDITOR to true, so commands that would normally open an editor complete without one.
/runRun a shell commandAsks before adding the output, showing its token size; if a failed run is added, a fix request is prefilled.
!Shell shortcut for /runType the shell command straight after the exclamation mark; it is handled exactly like /run.
/testRun tests, keep failuresWithout an argument it runs the --test-cmd command; output from a passing run is not added.
/lintLint and fix filesAsks before fixing each file with errors and commits pending changes first; needs a git repository.

Context and history (6)

Command / SyntaxWhat it doesNotes
/tokensShow token use and costLists system messages, history, repo map and each file with its input cost, then the context window left.
/mapPrint the repo mapPrints a notice instead when no repository map is available.
/map-refreshRebuild the repo mapConfirms when done and points you to /map to view the refreshed result.
/clearClear chat historyFiles stay in the chat and only the conversation is emptied, unlike /reset.
/resetDrop files and historyCombines /drop and /clear; read-only files given with --read at launch stay in the chat.
/copy-contextCopy context for a web chatEnds the copied text with a request for edit-only answers, plus anything typed after the command.

Writing prompts (9)

Command / SyntaxWhat it doesNotes
/editorWrite a prompt in an editorOpens a markdown file; whatever you save is placed at the prompt to review before sending.
/editShort form of /editorBehaves exactly like /editor, and text typed after either command starts the file.
/multiline-modeToggle multi-line inputEnter then adds a new line and Meta+Enter sends; the --multiline switch starts aider this way.
/pastePaste from the clipboardA clipboard image is saved as clipboard_image.png unless named, then added to the chat like a file.
/voiceDictate a promptNeeds an OpenAI API key for Whisper; the transcript lands at the prompt for editing.
/webAdd a webpage to the chatNeeds a URL; the page text joins the chat history rather than being added as a file.
/copyCopy the last replyOn Linux it may need xclip or xsel; aider previews the first 50 characters it copied.
{ ... }Wrap a multi-line messagePut each brace on a line of its own, with the message lines between them.
{tag ... tag}Tagged multi-line messagePick a tag of letters or digits when the message itself contains a closing brace.

Session (4)

Command / SyntaxWhat it doesNotes
/settingsShow current settingsAlso lists metadata for the main, editor and weak models, such as context size and token costs.
/reportFile a GitHub issueText after the command becomes the issue title; aider's version and model details go into the body.
/exitExit aiderEnds the session; to stop only the current reply, interrupt it with Ctrl + C instead.
/quitQuit aiderIdentical 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

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