Skip to main content

Remove Claude/AI attribution from a GitHub repo: clean history, force-push, and refresh the Contributors graph.

Project description

declaude

Remove Claude/AI attribution from a GitHub repo — in one command.

declaude OWNER/REPO

It clones the repo, strips Claude/AI traces from your entire commit history (e.g. Co-Authored-By: Claude <noreply@anthropic.com> or "Generated with Claude Code"), force-pushes the cleaned branches, and refreshes GitHub's Contributors graph so @claude actually disappears — all without touching your code or your commit authorship.

Why @claude won't go away by itself

AI tools append a Co-Authored-By: Claude … trailer to commits, and GitHub's Insights → Contributors graph counts those co-authors. That graph is a cached, background-computed view — a force-push (or a flush, or a commit) on its own doesn't reliably update it, so @claude lingers even after the history and the REST API are clean.

What actually works is a specific order:

remove Claude → flush (rename the default branch) → push a fresh commit

The flush resets GitHub's cached graph; the following commit triggers a recompute against the now-clean history. declaude does all three for you (the refresh commit is chore: refresh GitHub contributors, reusing your latest commit's author so no new identity appears). It runs even when the history is already clean, which is exactly what a previously-cleaned repo needs.

Install

pip install declaude        # installs the `declaude` command + git-filter-repo

Not yet on PyPI? Install straight from GitHub:

pip install git+https://github.com/ediiloupatty/declaude
# or, from a local clone:
pip install .

pip puts a declaude command on your PATH and pulls in git-filter-repo automatically — no manual setup. The one prerequisite pip can't install is the GitHub CLI, used to flush GitHub's Contributors-graph cache:

# install gh from https://cli.github.com, then log in:
gh auth login

declaude checks for gh and a valid login up front and tells you exactly what's missing before it touches anything.

Usage

declaude ediiloupatty/my-repo                      # OWNER/REPO slug
declaude https://github.com/ediiloupatty/my-repo   # full GitHub URL

declaude my-repo --dry-run    # show the plan, change nothing
declaude my-repo -y           # skip the confirmation prompt
declaude my-repo --no-refresh # clean + push only, skip the refresh commit
declaude my-repo --no-backup  # skip the restorable backup bundle (not recommended)

declaude prevent              # turn off Claude Code attribution going forward
declaude --version            # print the installed version

The repo is cloned to a temp dir, cleaned, force-pushed, refreshed, then discarded — you never clone by hand. Before any rewrite, a backup bundle is written to ~/.declaude-backups/ and is fully restorable:

git -C <repo> fetch ~/.declaude-backups/<name>.bundle '*:*'

Honest caveats

  • Claude authorship (rare). If a commit's author is Claude (not just a co-author), declaude warns but does not change it — use git filter-repo --mailmap to rewrite authorship.
  • The refresh commit. declaude leaves one chore: refresh GitHub contributors empty commit on the default branch (authored as you). It's harmless; drop it later with git rebase if you like. Skip the whole refresh with --no-refresh.
  • Shared repos. The flush renames the default branch and back. Collaborators with a local clone may see GitHub's "default branch renamed" notice. Use --no-refresh if that's a problem.
  • Graph lag. Even after the flush + refresh push, the Contributors graph can take a few minutes to update. Recheck in Incognito.
  • Closed pull requests. GitHub keeps old commits in refs/pull/N/head, which users can't delete. The Contributors graph is computed from the default branch (clean + refreshed), so @claude should still drop; if it persists, only GitHub Support can purge the PR-ref cache.

Commands

Command Purpose
declaude TARGET [-y] [--dry-run] [--no-refresh] [--no-backup] Clean history + force-push + refresh contributors graph. TARGET = GitHub URL or OWNER/REPO.
declaude prevent Set includeCoAuthoredBy:false in ~/.claude/settings.json.
declaude --version Print the installed version.

Requirements

  • Python 3.8+ and pip
  • git
  • gh (GitHub CLI, logged in) — install separately from https://cli.github.com
  • git-filter-repo — installed automatically as a pip dependency

Windows: works in PowerShell and Windows Terminal (ANSI colors are enabled automatically; set NO_COLOR=1 to disable). git, gh, and Python must be on your PATH.

Development

pip install -e ".[dev]"   # editable install with test deps
python -m pytest          # run the scrubber tests
python -m declaude --help # run without installing the console script

License

MIT © ediiloupatty

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

declaude-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

declaude-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file declaude-0.1.0.tar.gz.

File metadata

  • Download URL: declaude-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for declaude-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4ef49a37d5fc6642659dcc31fe6d763fd18adda912be7756927fb720c9c7c001
MD5 ea61c62d779b6d8c878afa43b5161e82
BLAKE2b-256 4d5f558713b72f3d296cd9bfc5577157589d3a6f5dc72e0009d31d97085119b9

See more details on using hashes here.

File details

Details for the file declaude-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: declaude-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for declaude-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c7e8b6240d4c1ad8f4019aabd34e81158b2ba4dc85133730d599c028533c050
MD5 324d77cef631f86d7d1ab50b4df24868
BLAKE2b-256 ea1e5d419545f65ca5750dbf616d0aedc8200351e439fe8d7bb32fae9a3c6d56

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