Aider is an AI coding assistant in the terminal with Git integration for automatic commits. This article covers Aider installation, basic usage, and Git workflow integration.
Aider is an AI coding assistant in the terminal supporting GPT-4, Claude, and other models, with seamless Git integration.
pip install aider-chat
# or
brew install aider-chat
# Start Aider
aider
# Add files
aider add src/app.py
# Edit with description
> /edit modify get_user function to add caching
# Auto-commit
aider --auto-commit
# Manual commit
aider --commit
# Branch management
aider --git-branch feature/new-api
aider --model claude-3-5-sonnet
> /add src/api.py
> Refactor API endpoints with auth middleware
> y
# Auto commits changes
Auto-repair applied and deterministic inspection checks passed.
命令示例验证通过
Git 集成说明准确