Skip to main content

🤖 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:

pip install git-guardian-ai

Usage

Navigate to your Git repository:

cd /path/to/your/project

Run the install command: This sets up the pre-commit hook in your repository's .git folder.

guardian install

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

# .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!

Metadata

Release files for ai-git-guardian 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-git-guardian 0.1.0
File Size Uploaded Provenance
ai_git_guardian-0.1.0.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-git-guardian 0.1.0
File Interpreter ABI Platform
ai_git_guardian-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / ai_git_guardian-0.1.0.tar.gz

Download URL ai_git_guardian-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1f7fecff1eb0a86f454c86d3ff12963280d351513d7e32e2a62a891a86c7f68
BLAKE2b-256 checksum
How to use checksums
4a57beb8316cd5dffd7334e9755ed3a5b3981e4f62e836721f8f75f33df0b94a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / ai_git_guardian-0.1.0-py3-none-any.whl

Download URL ai_git_guardian-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f022fa209d117732a3d0e239e29dc5388e104d986574735a6a5ac391ea71947
BLAKE2b-256 checksum
How to use checksums
b84daca6a7227a4f7e8717cb8bc2def8f21e77f977f4dcd661e90d8568acc6f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for ai-git-guardian 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page