Swap two names everywhere at once, like renaming foo to bar and bar to foo.
Rename an identifier across a codebase in all its casing styles automatically.
Preview changes safely with dry-run mode before writing anything.
Undo a bulk rename using the automatic .orig backup files.
| jlevy/repren | avaturn-live/avtr-1 | juyterman1000/entroly | |
|---|---|---|---|
| Stars | 371 | 362 | 382 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | easy |
| Complexity | 1/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Single Python file with no dependencies, runs directly with uvx repren, no install needed.
repren is a command-line tool for bulk text replacement and file renaming. You give it one or more search-and-replace patterns, point it at files or directories, and it rewrites file contents and renames files at the same time in a single pass. The feature that sets it apart from tools like sed is that all substitutions happen simultaneously. This means you can swap two names at once, for example renaming every occurrence of foo to bar while also renaming every occurrence of bar to foo, without needing a temporary intermediate step. It also handles filename renaming, not just file contents, and can recurse through entire directory trees. A case-preserving mode lets you rename an identifier in all its common forms at once. If you rename user_name to account_id, the tool automatically also renames userName to accountId, UserName to AccountId, and USER_NAME to ACCOUNT_ID. This is useful when renaming variables across a codebase that mixes coding conventions. For safety, repren defaults to a dry-run mode that shows what would change without writing anything. When you run it for real, it saves .orig backup copies of every modified file. If you realize you made a mistake, you can run it again with the --undo flag to restore everything from those backups. When you are satisfied, a separate --clean-backups command removes the backups. The tool is a single Python file with no external dependencies, requiring only Python 3.10 or later. It can be run directly with uvx repren without installing anything. It also includes a built-in skill file for AI coding tools like Claude Code, so an agent can install it and use it as part of a refactoring workflow. Output can be formatted as JSON for easier parsing by scripts or agents.
A command-line tool that renames files and rewrites their contents at the same time using simultaneous, undo-safe search-and-replace.
Mainly Python. The stack also includes Python, CLI.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.