Home
Omar Hosney
Aider Cheat Sheet
What is Aider?
- Aider is an AI-powered coding assistant that helps you write, refactor, and debug code.
Installation
- Install Aider using pip: `pip install aider-chat`.
- You'll also need an API key for your chosen language model (e.g., OpenAI).
Aider Command Details
/add โ
- Use `/add` to add specific files to the chat for editing or review.
/ask โ
- Use `/ask` to get answers about your codebase without making any changes.
/chat-mode ๐ฌ
- Switch between chat modes like `code`, `ask`, or `help` using `/chat-mode`.
/clear ๐งน
- Clear the current chat history with `/clear`.
/clipboard ๐
- Paste images or text from your clipboard into the chat using `/clipboard`.
/code ๐ป
- Request code changes using `/code` in the chat.
/commit ๐พ
- Commit changes made outside the chat using `/commit` with an optional message.
/diff ๐
- See the difference between the current code and the previous version with `/diff`.
/drop โ
- Remove files from the chat to free up context space using `/drop`.
/exit ๐ช
- Exit the Aider application with `/exit`.
/git ๐ฟ
- Execute Git commands directly within the chat using `/git`.
/help โ
- Get help with Aider commands and features by typing `/help`.
/lint ๐
- Lint and fix code in the chat or dirty files using `/lint`.
/ls ๐
- List all known files and see which ones are included in the chat with `/ls`.
/map ๐บ๏ธ
- View the current repository map created by Aider using `/map`.
/map-refresh ๐
- Refresh the repository map manually with `/map-refresh`.
/model ๐ค
- Switch to a different language model using `/model`.
/models ๐
- Search the list of available language models with `/models`.
/quit ๐
- Quit the Aider application using `/quit`.
/read-only ๐๏ธ
- Add files to the chat for reference only, preventing edits with `/read-only`.
/reset โช
- Reset the chat by dropping all files and clearing the history with `/reset`.
/run โถ๏ธ
- Run a shell command and optionally add its output to the chat using `/run` (alias: `!`).
/settings โ๏ธ
- View the current Aider settings with `/settings`.
/test ๐งช
- Run a shell command and add the output to the chat if it fails (non-zero exit code) using `/test`.
/tokens ๐งฎ
- Get a report on the number of tokens used by the current chat context with `/tokens`.
/undo โถ
- Undo the last Git commit made by Aider using `/undo`.
/voice ๐ค
- Record and transcribe voice input for coding instructions with `/voice`.
/web ๐
- Scrape a webpage, convert it to markdown, and send it as a message using `/web`.