/run
Runs a shell command and offers to add its output to the chat.
/run <command> (alias: !) runs any shell command in the project directory and shows the output. Afterwards Aider asks whether the output should be added to the chat context, so the model can react to, e.g., errors or test results.
โ WHEN TO USE IT?
Quickly kick off a build or test command and discuss the result right away
/run npm run build โ add the output to the chat on failure so Aider fixes the error immediately
Check project state without switching to another terminal
/run git status โ quickly see what changed since the last commit
โ WHEN NOT TO?
The same test command should run automatically after every change
/run has to be called manually each time; it's not a persistent hook.
Better: Use --test-cmd together with --auto-test, or /test, for recurring test runs with automatic error output in the chat
A potentially destructive command (e.g. a database migration, rm) should run
/run executes the command unchecked in the real project directory; a typo can cause real damage.
Better: Test risky commands directly in your own terminal with full control first, before running them via /run
SOURCES
- Aider Docs โ In-chat Commands โ aider.chat