Is there a way to replace my old GitHub username in every README and package.json after I change my account name?
19:07 05 Nov 2025

I recently changed my GitHub username, and now a lot of my repositories still contain my old username inside files like README.md, package.json, and even code comments.

GitHub automatically redirects repo URLs, but the old username still appears in badges, links, and npm references.

Updating them manually across multiple repos would take hours.

Is there a way to automatically replace the old username with the new one across all my repositories — preferably using the GitHub API or some automation script?

I’m looking for something that can:

  • Scan all my repos

  • Detect my old username in files (like Markdown or JSON)

  • Replace it with the new one

  • Commit and push the changes automatically

Any existing tools or scripts that can handle this safely?

node.js github automation scripting