Gitlint plugin for RAI footer validation
Project description
gitlint-rai
A gitlint plugin that enforces exactly one thing:
if AI touched the code, say so in the commit. ⚖️
That’s it. No philosophy, no negotiations. Pick a trailer and move on.
⭐ Found this useful? Star the repo.
Installation 🔧
pip install gitlint-rai
Or with uv, which is objectively the better choice:
uv add gitlint-rai
Usage 🚦
Run the bundled wrapper — it loads the RAI rules automatically and accepts all gitlint arguments:
gitlint-rai
gitlint-rai --msg-filename .git/COMMIT_EDITMSG
Prefer plain gitlint? Point your .gitlint config at the installed package:
[general]
extra-path=/path/to/site-packages/gitlint_rai
Get that path with:
python -c "import gitlint_rai, pathlib; print(pathlib.Path(gitlint_rai.__file__).parent)"
To verify the rule loaded:
gitlint-rai --debug
Look for rai-footer-exists and rai-signed-off-by in the loaded-rules output. If you see them, the plugin is active and doing its job.
Both rules are enforced by default: rai-footer-exists (UC1) requires an AI attribution trailer, and rai-signed-off-by (UC2) requires the Signed-off-by: Your Name <email> footer that git commit -s adds. To skip sign-off enforcement, add ignore=rai-signed-off-by under [general] in your .gitlint.
Valid Trailers 📌
Pick the one that matches the majority AI contribution. Skip it entirely and the commit fails. Extra footers are fine — the rule only checks that at least one valid footer exists.
This is not a debate.
Authored-by: [Human] <email>— all you, no AI involvedCommit-generated-by: [AI Tool] <email>— AI wrote the commit message, you wrote the codeAssisted-by: [AI Tool] <email>— AI helped some, you were drivingCo-authored-by: [AI Tool] <email>— roughly 50/50, like actual pair programmingGenerated-by: [AI Tool] <email>— AI did most of it, you supervised
All patterns are case-insensitive, because life is too short for that kind of pedantry.
Why This Exists ⚖️
Git already supports trailers. Commits already support attribution. What they don’t do is require you to be honest when AI is involved.
This plugin exists to make that honesty boring, consistent, and automatic, so nobody has to reconstruct intent later by reading commit history like tea leaves.
If you want the longer reasoning behind this, it lives at Did AI Erase Attribution?.
This plugin is the practical follow-through.
Requirements ⚙️
- Python >= 3.11, < 3.15
- gitlint >= 0.19.1
License 📄
PolyForm Shield License 1.0.0 — free to use anywhere, including inside commercial products. What's off the table: providing anything that competes with this tool — selling it, rebranding it, hosting it, or shipping a practical substitute, paid or free. This is a plain-language summary; the LICENSE is what actually controls. Commercial licensing questions: anchildress1@gmail.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlint_rai-1.0.1.tar.gz.
File metadata
- Download URL: gitlint_rai-1.0.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504e1e2e80bbc1a6055060f076874a2f18d21202c4646fcb3da99fcd5b0e549f
|
|
| MD5 |
5aae8bb1d691c3266861769b8b4bc5f0
|
|
| BLAKE2b-256 |
94a800046f5a8f6f88300ce790e2022587d9af06b19dec1fa01ac08b503f70da
|
Provenance
The following attestation bundles were made for gitlint_rai-1.0.1.tar.gz:
Publisher:
release-please.yml on anchildress1/rai-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlint_rai-1.0.1.tar.gz -
Subject digest:
504e1e2e80bbc1a6055060f076874a2f18d21202c4646fcb3da99fcd5b0e549f - Sigstore transparency entry: 2089353090
- Sigstore integration time:
-
Permalink:
anchildress1/rai-lint@d68f02819af3514b108f3ef2a312ee70f9490aab -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anchildress1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@d68f02819af3514b108f3ef2a312ee70f9490aab -
Trigger Event:
push
-
Statement type:
File details
Details for the file gitlint_rai-1.0.1-py3-none-any.whl.
File metadata
- Download URL: gitlint_rai-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342e25346ce86b89ed6dae31548252fff8e9626d10a14f3384796cbe65e15abf
|
|
| MD5 |
c75b0774b0e2b135784433cc8e2bff4f
|
|
| BLAKE2b-256 |
cc1244baeee992262a739f8594c682eb0dfb7f34f499cf30a1ed3c60ce70c5df
|
Provenance
The following attestation bundles were made for gitlint_rai-1.0.1-py3-none-any.whl:
Publisher:
release-please.yml on anchildress1/rai-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlint_rai-1.0.1-py3-none-any.whl -
Subject digest:
342e25346ce86b89ed6dae31548252fff8e9626d10a14f3384796cbe65e15abf - Sigstore transparency entry: 2089353269
- Sigstore integration time:
-
Permalink:
anchildress1/rai-lint@d68f02819af3514b108f3ef2a312ee70f9490aab -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anchildress1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@d68f02819af3514b108f3ef2a312ee70f9490aab -
Trigger Event:
push
-
Statement type: