Experimental Custom extensions for the Aider AI coding assistant. The purpose of this repository is to experiment with possible new features and suggest to aider contributor to add based on their judgement. Do not consider this in any way related to official distribution of aider.
This is just for experimentation and not for serious use. If you want to use these files, please verify the code yourself and experiment with it before using it to any work.
- RAG (Retrieval Augmented Generation) support for document querying
- Advanced chat customization with keyword substitution
- Enhanced Git integration with better visualizations
- Code analysis and explanation tools
- Interactive context management and visualization
- GUI editors with syntax highlighting
- Web and voice command enhancements
- Template support for common development tasks
# First install aider
pip install aider-chat
# Clone this repository
git clone https://github.com/YourUsername/aider-extension.git
cd aider-extension
# Install additional dependencies
pip install jinja2
pip install llama-index-core
pip install llama-index-embeddings-huggingface
pip install pygments
pip install pyperclip
pip install streamlit
./
├── main.py # New simple runner
├── .extn_aider/
│ ├── command_templates/ # Command templates
│ │ ├── load_templated/
│ │ └── load_templated_script/
│ └── All_Commands/ # Reference implementations (not used directly)
│ ├── docrag_commands/
│ ├── git_commands/
│ ├── context_commands/
│ └── ...
└── custom_aider/ # Core extension implementation
├── __init__.py
├── monkey_patch.py # Early patching system
├── custom_aider_main.py
├── custom_coder.py
├── commands_registry.py
├── commands/ # Active command implementations
│ ├── docrag_commands.py
│ ├── git_commands.py
│ └── ...
├── gui/ # GUI components
└── docs/ # Documentation
- Start the extended version:
python main.py
- Use new commands in chat:
> /help # See available commands
> /createragfromdoc docs ./documentation.md # Create a RAG
> /glog -n 5 # Show git history
Note: For detailed documentation on each command, see the README.md files in .extn_aider/All_Commands/*/
/createragfromdoc
- Create a RAG from document/queryragfromdoc
- Query existing RAGs/listrag
- List available RAGs/deleterag
- Remove a RAG
/customchat
- Chat with keyword substitution/clip-edit
- Apply clipboard edits/tkinter_editor
- Launch desktop editor
/glog
- Enhanced git log/zadd
- Smart git add/zcommit
- Enhanced commit with stats
/showcontext
- Save/display chat context/explain
- Interactive code explanation/files
- List files with details/stats
- Show file statistics
/zvoice
- Enhanced voice command/zweb
- Enhanced web scraping/load_templated
- Load command templates/load_templated_script
- Load script templates
- Create
.aider.conf.yml
:
model: gemini/gemini-1.5-flash-latest
map-tokens: 1024
subtree-only: true
- Create
.extn_aider.keywords.json
for chat substitutions:
{
"api": "REST API with JSON responses",
"tests": "Unit tests using pytest"
}
The extension system uses several key components:
-
Command Registry (
commands_registry.py
)- Central registration of commands
- Manages completion handlers
- Handles command help text
-
Custom Coder (
custom_coder.py
)- Extends Aider's base Coder
- Installs custom commands
- Provides extension hooks
-
Monkey Patching (
monkey_patch.py
)- Early class patching
- Safe core modifications
- Path management
-
Template Systems
- Command templates
- Script templates
- Project scaffolding
For more technical details, see custom_aider/docs/extension-docs.md
.
.extn_aider/All_Commands/
contains reference implementations and documentation for each command type- Active command implementations go in
custom_aider/commands/
- GUI components in
custom_aider/gui/
- Documentation in
custom_aider/docs/
Feel free to experiment with these extensions and suggest improvements. This is an experimental project meant to explore potential new features for the Aider project.
This project is licensed under the Apache License - see the LICENSE file for details.