Aider
Integrate ARZASTORE AI API with Aider — AI pair programming in the terminal
Terminal-based Coding
About Aider
Aider is a terminal-based AI coding assistant with:
Edit multiple files at once; AI understands the full project context
Automatically commits changes with descriptive messages
Supports voice input for hands-free coding
Supports OpenAI, Anthropic, and custom endpoints
Installation
Install via pip
# Cài đặt Aider
pip install aider-chat
# Hoặc với pipx (khuyến nghị)
pipx install aider-chat
# Verify installation
aider --version
Configure ARZASTORE AI API
Method 1 Environment Variables
Set environment variables in your terminal or shell config:
# Set API credentials
export OPENAI_API_KEY="sk-your-api-key"
export OPENAI_API_BASE="https://api.arzastore.com/v1"
# Chạy Aider với model cụ thể
aider --model openai/gpt-4o
Method 2 .env File (per-project)
Create a .env file in your project folder:
# .env
OPENAI_API_KEY=sk-your-api-key
OPENAI_API_BASE=https://api.arzastore.com/v1
Then run: aider --model openai/gpt-4o
Method 3 .aider.conf.yml Config File
Create a config file to save default settings:
# .aider.conf.yml
model: openai/gpt-4o
auto-commits: true
dark-mode: true
stream: true
Using Aider
Start a Session
# Mở Aider trong project folder
cd /path/to/project
aider --model openai/gpt-4o
# Hoặc với specific files
aider --model openai/gpt-4o src/main.py tests/test_main.py
Commands in Aider
Usage Example
# Trong Aider session:
> /add src/api.py src/models.py
> Add a new endpoint POST /users that creates a user with email and password validation
# Aider sẽ phân tích files và đề xuất changes
# Review changes → y to accept, n to reject
Tips
- •Auto-commits: Enable --auto-commits so Aider automatically commits each change with a descriptive message
- •Architect mode: Use --architect so Aider focuses on design before coding
- •Watch mode: Use --watch so Aider automatically reloads when files change
- •Model selection: GPT-4o for complex refactoring, GPT-4o-mini for quick fixes
Git repo required