Metadata-Version: 2.4
Name: diffaid
Version: 0.1.0
Summary: AI-assisted git diff review CLI
Author-email: Nathan Towsley <natetowsley@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Nathan Towsley
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/natetowsley/diffaid
Keywords: git,diff,ai,code-review,cli,gemini
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Environment :: Console
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: google-genai>=0.3.0
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-mock>=3.0; extra == "dev"
Dynamic: license-file

# DiffAid

AI-assisted git diff review CLI that catches bugs before you commit.

## Features

- **Smart Analysis** - Uses Gemini AI to review code changes
- **CI Integration** - Exit codes for automated workflows  
- **Fast** - Reviews in seconds with Gemini Flash
- **Clean Output** - Color-coded findings in your terminal

## Setup

1. Get a free Gemini API key: https://aistudio.google.com/apikey

2. Set the environment variable:

<br>

   **Mac/Linux:**
```bash
   export GEMINI_API_KEY="your-key-here"
```

   **Windows (PowerShell):**
```powershell
   $env:GEMINI_API_KEY="your-key-here"
```

   **Permanent Setup (Mac/Linux):**
   Add to `~/.bashrc` or `~/.zshrc`:
```bash
   echo 'export GEMINI_API_KEY="your-key-here"' >> ~/.bashrc
   source ~/.bashrc
```

<br>

## Usage
Stage your changes and run:
```bash
git add .
diffaid
```
DiffAid will analyze your staged changes and report:

- **Errors** - Critical issues that should be fixed
- **Warnings** - Potential problems worth reviewing
- **Notes** - Suggestions for improvement

Example Output

```
Summary: Added user authentication with JWT tokens

ERROR: Hardcoded secret key detected
  → auth.py 15-17

WARNING: Missing error handling for database connection
  → db.py 42

NOTE: Consider adding rate limiting to login endpoint
  → routes.py 28

---
Found: 1 errors, 1 warnings, 1 notes
```
Exit Codes

- 0 - No errors found (warnings are OK)
- 1 - Errors found
- 2 - Tool error (git/API failure)

## Requirements

- Python 3.10+
- Git
- Gemini API key (free tier available)

## License
MIT License - see LICENSE file for details.

## Acknowledgments
Powered by Google Gemini
