# AI Code Buddy
[](https://crates.io/crates/ai-code-buddy)
[](https://opensource.org/licenses/MIT)
An AI-powered code review tool that analyzes Git repositories and provides intelligent feedback on code quality, security, performance, and maintainability.
## Features
- ๐ **Intelligent Code Analysis**: Uses AI to analyze code patterns and provide meaningful suggestions
- ๐ฒ **Git Branch Comparison**: Compare commits between branches (e.g., feature branch vs. develop)
- ๐ฏ **Multi-Language Support**: Supports Rust and general programming patterns
- ๐ **Detailed Reporting**: Categorized issues by severity (Critical, High, Medium, Low, Info)
- ๐ฅ๏ธ **Dual Interface**: Both CLI and interactive TUI modes
- ๐ **Comprehensive Reports**: Generate detailed code review reports
## Installation
### From crates.io
```bash
cargo install ai-code-buddy
```
### From source
```bash
git clone https://github.com/edgarhsanchez/ai_buddy.git
cd ai_buddy
cargo build --release
```
## Usage
### CLI Mode
```bash
# Analyze current branch against develop
ai-code-buddy --cli
# Analyze specific branches
ai-code-buddy --cli --source feature-branch --target main
```
### Interactive TUI Mode
```bash
# Launch interactive interface
ai-code-buddy
```
The interactive mode provides:
- Overview of all findings
- Navigate through issues by category
- Detailed view of each issue
- Generate comprehensive reports
## Issue Categories
- **๐ Security**: Potential security vulnerabilities
- **๐ Potential Bugs**: Code patterns that might cause issues
- **โก Performance**: Performance optimization opportunities
- **๐ Documentation**: Missing or inadequate documentation
- **๐จ Style**: Code style and formatting issues
- **๐ง Maintainability**: Code maintainability improvements
- **๐ Readability**: Code readability enhancements
- **๐งช Testing**: Testing-related suggestions
## Configuration
AI Buddy automatically detects:
- Repository technology stack
- Programming languages used
- Code patterns and anti-patterns
- Git branch structure
## Examples
### CLI Output
```
๐ฏ Code Review Summary
Repository: /path/to/repo
Branches: feature-branch โ main
Technology: Rust, JavaScript
๐ Issues Found: 15
๐ด Critical: 0
๐ High: 2
๐ก Medium: 5
๐ต Low: 6
โน๏ธ Info: 2
```
### Interactive Features
- **Arrow keys**: Navigate through issues
- **Enter**: View detailed issue information
- **R**: Generate comprehensive report
- **Q**: Quit application
## Requirements
- Rust 1.70+
- Git repository
- Network connection for AI processing
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Roadmap
- [ ] Support for more programming languages
- [ ] Custom rule configuration
- [ ] Integration with CI/CD pipelines
- [ ] Web interface
- [ ] Team collaboration features
## Acknowledgments
- Built with [Kalosm](https://crates.io/crates/kalosm) for AI language processing
- Uses [git2](https://crates.io/crates/git2) for Git repository analysis