Skip to main content

A package that prevents AI slop by asking you questions about your code changes before allowing you to commit

Project description

Git Police

An Anti-AI slop tool that helps prevent slop code from being pushed and allows only the code that you understand to be pushed

install this in your virtual environment

pip install git-police

To initialize

git-police init

To run global (only supports gemini for now)

export a GEMINI_API_KEY as an environment variable

git add .
GIT_POLICE_MODE=global git commit -m "msg"

To run a different ollama model than phi4-mini:latest

If you don't have the ollama model Make sure you have ollama installed in your system

ollama pull your_model
GIT_POLICE_MODEL="your_model" git commit -m "msg"

You can change Max characters sent to your local model for speed

MAX_CHAR=int GIT_POLICE_MODEL="your model if not default and not in env" git commit -m "msg"
git add .
GIT_POLICE_MODEL="your_model" git commit -m "msg"

Incase of hallucinations or emergency commits

git add .
git commit -m "your msg" --no-verify

See it work

approved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_police-0.1.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_police-0.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file git_police-0.1.4.tar.gz.

File metadata

  • Download URL: git_police-0.1.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for git_police-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c1d2172680e23385b724c188f0949a13d56637babdc36b6a029acecc31c24819
MD5 3b5eab45a6ab6bc91305e93f08a0a3bc
BLAKE2b-256 4509e03e2171bde1556195fe8e87f1d9bc88183420f0542c98e067bec35ad4dd

See more details on using hashes here.

File details

Details for the file git_police-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: git_police-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for git_police-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4e926ec4f835676c03faa6d7790e570b97421f7c357a438096b056760b990c67
MD5 d2c6b333bf1b97a08aa386e1d131f43c
BLAKE2b-256 6538420a0261cd620c1e93c1a23ca7aa7f4cf371f69a94123001fdae966528ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page