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 phi3.5

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.3.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.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_police-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9bd4b20e2bfb93135b87c0269ba4f7df1337d712430596f096e7f04722e225bd
MD5 8eda57b1064634ead7ca77e6167538d2
BLAKE2b-256 17ba01f4a398265f338e739c9ed806a3fc81047acf79d0c6397c54f7f6143604

See more details on using hashes here.

File details

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

File metadata

  • Download URL: git_police-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fac9da9f49e79ebc4bf78a4a47870f7c07a627eeb04fd42b9e5176c1c05ee3b4
MD5 129723a663d967b7fea542a92691b345
BLAKE2b-256 ca4e2f6f2443e2985eaef753bd672b01810cdf1ad56b75e062aefe55e6382541

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