Skip to main content

gitlint-rai

RAI Lint

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.

  1. Authored-by: [Human] <email> — all you, no AI involved
  2. Commit-generated-by: [AI Tool] <email> — AI wrote the commit message, you wrote the code
  3. Assisted-by: [AI Tool] <email> — AI helped some, you were driving
  4. Co-authored-by: [AI Tool] <email> — roughly 50/50, like actual pair programming
  5. Generated-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

Related 🔗

Enforcement is only half the story. RAI Commit Attribution Badge reads these footers back out of your history and publishes the score as a badge.

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.

Download files

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

Source Distribution

gitlint_rai-1.0.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

gitlint_rai-1.0.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file gitlint_rai-1.0.2.tar.gz.

File metadata

  • Download URL: gitlint_rai-1.0.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gitlint_rai-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d76d40cef138909723d094f0b568ea77f17daa6d1f6773df42ca075e95a7b5e0
MD5 710f075c3fc0b59b01d235a7757b2e2b
BLAKE2b-256 fcc4d9823343d5fcac6a8da9a1e13b950db759d8743025ffd8f29572f9caa5f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlint_rai-1.0.2.tar.gz:

Publisher: release-please.yml on anchildress1/rai-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitlint_rai-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gitlint_rai-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gitlint_rai-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2652d57e8a690808b4b0e040531c87ecaaf8ad16cbdd4f64cd4352b1bbfa7a4
MD5 b950f2b444b8c162be9e8295ff8f7248
BLAKE2b-256 3899a231d73e333026d80af8d4eb1df07ae01db6e48a9410a46769fd2af5a015

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlint_rai-1.0.2-py3-none-any.whl:

Publisher: release-please.yml on anchildress1/rai-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.0.0

2 files

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