Metadata-Version: 2.4
Name: ai-git-guardian
Version: 0.1.0
Summary: An AI-powered Git pre-commit hook using Ollama to review code.
Author-email: Your Name <your@email.com>
License: MIT
Project-URL: Homepage, https://github.com/Nirav0702/git-guardian
Project-URL: Bug Tracker, https://github.com/Nirav0702/git-guardian/issues
Keywords: git,hook,ai,llm,codereview,ollama
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: typer[all]>=0.9.0
Requires-Dist: tomli>=2.0.0; python_version < "3.11"

# 🤖 Git Guardian AI

An intelligent Git pre-commit hook that uses a local Ollama LLM to automatically review your code changes before you commit them.

## Features

-   **Automated Code Review**: Catches potential bugs, security flaws, and performance issues.
-   **Local & Private**: Uses your own Ollama instance, so your code never leaves your machine.
-   **Configurable**: Easily configure the model, blocking rules, and ignored files.
-   **Easy Installation**: Get started in any Git repository with two commands.

## Installation

You need to have a running Ollama instance with a model pulled (e.g., `ollama pull codellama:latest`).

Install the package using pip:

```bash
pip install git-guardian-ai
````

## Usage
Navigate to your Git repository:

```bash
cd /path/to/your/project
````
**Run the install command**: This sets up the pre-commit hook in your repository's .git folder.

````bash
guardian install
````

**(Optional) Configure Guardian**: Create a .guardian.toml file in the root of your repository to customize the settings.

````bash
# .guardian.toml
model = "llama3:8b"
block_on = ["security", "logic"]
warn_on = ["performance", "style"]
````
Now, whenever you run git commit, the Guardian will automatically analyze your staged changes!
