π€ Codry - AI-Powered Code Review Service

An intelligent code review service that leverages multiple AI providers to automatically review pull requests and merge requests across different VCS platforms.
π Features
- β
GitLab - Complete integration with GitLab CE/EE
- β
GitHub - Full GitHub.com and GitHub Enterprise support
- β
Bitbucket - Complete Bitbucket Cloud and Server support
Multiple AI Models
- β
Google Gemini - Gemini 2.5 Flash/Pro, cost-effective and fast
- β
OpenAI ChatGPT - GPT-4o, GPT-4o-mini, GPT-3.5-turbo
- β
Claude/Anthropic - Claude 3.5 Sonnet/Haiku, excellent reasoning
- β
Azure OpenAI - Enterprise-grade OpenAI integration
- β
Local Models - Ollama, LocalAI (OpenAI-compatible APIs)
- π More coming - Claude, Cohere, and other providers
Smart Features
- π€ Automatic Reviews - AI-powered code analysis and suggestions
- π MR/PR Descriptions - Auto-generate comprehensive descriptions
- π― Reviewer-based Triggers - Start reviews when bot is added as reviewer
- π File Filtering - Smart filtering by extension, size, and paths
- π‘οΈ Security-First - Webhook validation and secure token handling
- π Enterprise Ready - Rate limiting, monitoring, and compliance features
π Quick Start
# Download the latest release
wget https://github.com/maxbolgarin/codry/releases/latest/download/codry
# Make it executable
chmod +x codry
# Copy example configuration
cp config.example.yaml config.yaml
# Edit configuration
nano config.yaml
2. Choose Your AI Provider
Option A: Claude (Recommended for Code Reviews)
agent:
type: "claude"
api_key: "${CLAUDE_API_KEY}"
model: "claude-3-5-haiku-20241022" # Cost-effective
# model: "claude-3-5-sonnet-20241022" # Best quality
Option B: OpenAI ChatGPT
agent:
type: "openai"
api_key: "${OPENAI_API_KEY}"
model: "gpt-4o-mini" # Fast and affordable
# model: "gpt-4o" # Best quality
Option C: Google Gemini
agent:
type: "gemini"
api_key: "${GEMINI_API_KEY}"
model: "gemini-2.5-flash-preview-05-20" # Fast and free tier
3. Set Environment Variables
# For Claude
export CLAUDE_API_KEY="sk-ant-your-claude-api-key"
# For OpenAI
export OPENAI_API_KEY="sk-your-openai-api-key"
# For Gemini
export GEMINI_API_KEY="your-gemini-api-key"
# For your VCS platform
export GITLAB_TOKEN="glpat-your-gitlab-token"
export GITHUB_TOKEN="ghp_your-github-token"
# Webhook secrets
export GITLAB_WEBHOOK_SECRET="your-webhook-secret"
export GITHUB_WEBHOOK_SECRET="your-webhook-secret"
4. Start the Service
./codry --config config.yaml
GitLab Setup
Basic GitLab configuration is included in the main config. For advanced features, see the documentation.
GitHub Setup
For detailed GitHub integration including webhook setup and reviewer triggers:
π GitHub Setup Guide
Bitbucket Setup
For complete Bitbucket Cloud and Server integration with webhook configuration:
π Bitbucket Setup Guide
π€ AI Provider Guides
Claude/Anthropic Setup
For Claude 3.5 models with superior reasoning capabilities:
π Claude Setup Guide
OpenAI ChatGPT Setup
For GPT-4o and other OpenAI models including Azure OpenAI:
π OpenAI Setup Guide
Google Gemini Setup
Gemini configuration is straightforward - just get an API key from Google AI Studio and configure as shown above.
π Configuration Options
Minimal Configuration
server:
address: ":8080"
provider:
type: "github" # or "gitlab", "bitbucket"
token: "${GITHUB_TOKEN}"
webhook_secret: "${GITHUB_WEBHOOK_SECRET}"
bot_username: "codry-bot"
agent:
type: "claude" # or "openai", "gemini"
api_key: "${CLAUDE_API_KEY}"
model: "claude-3-5-haiku-20241022"
Advanced Configuration
server:
address: ":8080"
endpoint: "/webhook"
timeout: 30s
provider:
type: "github"
base_url: "https://github.com" # or your GitHub Enterprise URL
token: "${GITHUB_TOKEN}"
webhook_secret: "${GITHUB_WEBHOOK_SECRET}"
bot_username: "codry-bot"
rate_limit_wait: 1m
agent:
type: "claude"
api_key: "${CLAUDE_API_KEY}"
model: "claude-3-5-sonnet-20241022"
max_retries: 3
retry_delay: 10s
temperature: 0.05
max_tokens: 6000
review:
file_filter:
max_file_size: 10000
allowed_extensions: [".go", ".js", ".ts", ".py", ".java"]
excluded_paths: ["vendor/", "node_modules/", "*.min.js"]
max_files_per_mr: 50
enable_description_generation: true
enable_code_review: true
min_files_for_description: 3
processing_delay: 5s
π οΈ Development
Building from Source
# Clone repository
git clone https://github.com/maxbolgarin/codry.git
cd codry
# Build
make build
# Run tests
make test
# Run with development config
make dev
Project Structure
codry/
βββ cmd/main/ # Application entry point
βββ internal/
β βββ agents/ # AI provider implementations
β β βββ claude/ # Claude/Anthropic integration
β β βββ openai/ # OpenAI ChatGPT integration
β β βββ gemini/ # Google Gemini integration
β βββ providers/ # VCS platform implementations
β β βββ github/ # GitHub integration
β β βββ gitlab/ # GitLab integration
β βββ config/ # Configuration management
β βββ webhook/ # Webhook handling
β βββ review/ # Review orchestration
β βββ service/ # Core business logic
βββ config.example.yaml # Example configuration
βββ docs/ # Setup guides and documentation
π Why Multiple AI Providers?
Different AI models excel at different tasks:
| Model |
Best For |
Speed |
Cost |
Code Quality |
| Claude 3.5 Haiku |
Daily reviews, reasoning |
βββ |
ββββ |
βββββ |
| Claude 3.5 Sonnet |
Complex analysis |
ββ |
ββ |
βββββ |
| GPT-4o-mini |
Fast reviews |
ββββ |
βββββ |
ββββ |
| GPT-4o |
Comprehensive reviews |
βββ |
ββ |
ββββ |
| Gemini 2.5 Flash |
Budget-conscious |
βββββ |
ββββ |
ββββ |
π Security Features
- Webhook Signature Validation - Cryptographic verification of incoming webhooks
- Rate Limiting - Built-in protection against abuse
- Token Security - Secure handling of API keys and access tokens
- Enterprise Support - GitHub Enterprise, GitLab Enterprise compatibility
- Local Model Support - Complete privacy with self-hosted models
π Enterprise Features
- Multi-tenant Support - Handle multiple organizations
- Audit Logging - Comprehensive activity tracking
- Cost Monitoring - Track AI API usage and costs
- Custom Filtering - Advanced file and change filtering
- Compliance Ready - SOC2, GDPR-compatible deployment options
π― Use Cases
Startup Teams
- Cost-effective daily code reviews
- Automated PR descriptions
- Consistent code quality enforcement
Enterprise Organizations
- Scalable code review automation
- Multi-platform repository support
- Compliance and security focused reviews
Open Source Projects
- Community contribution reviews
- Automated feedback for contributors
- Consistent review standards
π€ Contributing
We welcome contributions! Please see our contributing guidelines for details.
Current Priorities
- Bitbucket provider implementation
- Additional AI providers (Cohere, Mistral)
- Advanced filtering and routing
- Performance optimizations
- Enhanced enterprise features
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
β Star History
If you find this project useful, please consider giving it a star! β
Built with β€οΈ for developers who want intelligent, automated code reviews across any platform with any AI model.