Skip to main content

deai

PyPI Tests License: MIT

Remove AI co-author credits from your git history. Human co-authors and file contents stay as they are.

한국어

Before:

c72d54a docs: update README
        🤖 Generated with [Claude Code](https://claude.com/claude-code)
        Co-Authored-By: Claude <noreply@anthropic.com>
6b98cbb fix: handle empty input
        Co-authored-by: Jane Doe <jane@example.com>
049c5fb feat: add parser
        Co-Authored-By: Claude <noreply@anthropic.com>

After deai clean:

c70f42d docs: update README
24d6828 fix: handle empty input
        Co-authored-by: Jane Doe <jane@example.com>
0223c1d feat: add parser

Try it on your own repositories. scan only reads:

$ uvx --from git-deai deai scan -r ~/code
AI credits  ~/code/my-app  (3 commits; trailers 2, AI author/committer 0)
            trailer: c72d54a 049c5fb

AI coding tools append Co-Authored-By: Claude <noreply@anthropic.com> and similar lines to commit messages. GitHub reads them and lists the tool under your repository's Contributors. deai finds these credits across your repositories, backs up, and rewrites the messages. Nothing is pushed unless you ask.

Install

Requires Python 3.10+ and git. There are no other dependencies.

pip install git-deai
# or, as an isolated tool
uv tool install git-deai     # recommended
pipx install git-deai
# or, from a local clone
uv tool install -e .

The package is git-deai; the command it installs is deai. To try it without installing: uvx --from git-deai deai --help.

Usage

1. Scan (read-only). Scanning only reports; it changes nothing.

deai scan                          # the repository in the current directory
deai scan path/to/repo             # one repository
deai scan -r ~/code                # every repository under a folder
AI credits  /home/me/code/my-app  (96 commits; trailers 51, AI author/committer 0)
            trailer: faea929 e37c10a 2ce9a9c 7a5f1ab ...
     clean  /home/me/code/notes   (8 commits; trailers 0, AI author/committer 0)
    shared  /home/me/code/xarray  (6578 commits; trailers 96, AI author/committer 1)
            by others: Deepak Cherian <...>, ...
mark meaning
clean nothing to do
AI credits your commits carry AI credits; clean will fix them
shared someone else's commits carry AI credits (a fork or shared history); skipped by default

2. Clean (rewrites history).

deai clean path/to/repo            # shows the scan, asks y/N, backs up, rewrites
deai clean -r ~/code               # every repository found (shared ones skipped)
deai clean -r ~/code --yes --push  # no question; force-push afterwards

3. Publish. Without --push, nothing leaves your machine. When you are happy with the result, run the same command again with --push; scan marks such repositories unpushed until then. Do not use git push --all: it would also push stale local branches over newer remote ones. Do not git pull a cleaned branch either: it merges the old history, AI credits included, back in.

GitHub can take a while to refresh the Contributors list after the push.

Options

option commands what it does
-r, --recursive scan, clean find repositories below each path
--me EMAIL scan, clean another e-mail of yours (repeatable). git config user.email is always included.
--yes clean do not ask before rewriting
--push clean force-push branches (--force-with-lease) and tags afterwards
--as 'Name <email>' clean identity for commits authored by an AI (default: git config user.*)
--include-shared clean also rewrite shared repositories (rarely what you want)

What is removed

  • Co-authored-by: trailers whose name or e-mail matches an AI tool. Human co-authors stay.
  • "Generated with <AI tool>" lines, e.g. 🤖 Generated with [Claude Code](https://claude.com/claude-code).
  • AI author and committer identities, which are re-attributed to you.

Matched tools: Claude/Anthropic, GitHub Copilot, Cursor, ChatGPT/OpenAI/Codex, Gemini, Devin, Aider, Codeium/Windsurf, Tabnine, CodeWhisperer/Amazon Q, Jules, Sweep.

Safety

  • A clean worktree is required. clean refuses to run if tracked files have uncommitted changes.
  • A backup is made first. Every branch and tag is saved to .git/deai-backup-<time>.bundle. To restore it:
    git fetch --force .git/deai-backup-20261014-222005.bundle 'refs/*:refs/*'
    
  • Pushes never lose remote commits. --push fetches first.
    • A local branch that is behind its remote is fast-forwarded before the rewrite.
    • A branch that has diverged from its remote is compared commit by commit (git cherry, which matches a rewritten commit to its original). If the remote has nothing the branch lacks, the branch is pushed. If the branch has nothing the remote lacks (the remote was cleaned from another machine), the branch is moved to the remote's history. If both sides have new work, deai stops and tells you to git rebase onto the remote.
    • Each branch is force-pushed with an explicit lease on the commit seen at fetch time.
    • Only branches with an upstream are pushed; local-only branches stay local.
  • Forks are protected. A repository whose flagged commits were written by other people is marked shared and skipped. Rewriting it would split your fork from upstream.

Things to know

  • Commit hashes change from the first cleaned commit onward. Anyone else with a clone must re-clone (or git fetch && git reset --hard origin/<branch>).
  • Open pull requests from a rewritten branch need to be re-created.
  • GPG-signed commits lose their signatures, because the signed content changed.
  • Protected branches on GitHub may reject the force-push. Allow force-pushes temporarily, or push to a new branch.

Stop it from coming back

Turn the attribution off in your AI tool. In Claude Code, add this to ~/.claude/settings.json (an empty string removes that line; the older includeCoAuthoredBy is deprecated):

{ "attribution": { "commit": "", "pr": "" } }

How it works

git fast-export --branches --tags → message filter (stdlib Python) → git fast-import --force. There is no git-filter-repo dependency. File contents are passed through untouched, so every tree is byte-identical to the original.

Test

python tests/test_deai.py

License

MIT, see LICENSE.

Metadata

Release files for git-deai 0.2.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 git-deai 0.2.0
File Size Uploaded Provenance Actions
git_deai-0.2.0.tar.gz 16.3 kB With provenance Details for git_deai-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-deai 0.2.0
File Interpreter ABI Platform Actions
git_deai-0.2.0-py3-none-any.whl Python 3 none any Details for git_deai-0.2.0-py3-none-any.whl

Total release size: 28.3 kB

Release files / git_deai-0.2.0.tar.gz

Download URL git_deai-0.2.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
05bfb72e362c5ba788d6e7a0ff968b5dd2d3abf9b6b402c43bc77e543eb1c2a8
BLAKE2b-256 checksum
How to use checksums
b2bfec9a31dc878e7caf3591a777820d71877c5b4b98ab6de544182ed21739dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / git_deai-0.2.0-py3-none-any.whl

Download URL git_deai-0.2.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47d11d1077ba17e3563aefe04b9e117a099231d960568a2e7850abe0cc4bd3b2
BLAKE2b-256 checksum
How to use checksums
fdd7ab4d5aec0122d6dfea4ad7001e28b72471cbb95690bc6efdf565b6d964e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for git-deai 0.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for git_deai-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

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.

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