A powerful CLI tool for simultaneous string replacement and file/directory renaming with case preservation and backup support.
repren is a command-line tool for bulk text replacement and file renaming. It solves the problem of refactoring codebases by allowing simultaneous replacements across file contents and directory structures while preserving case conventions and providing safety features like backups and dry-run modes.
Developers and AI coding agents performing large-scale refactoring, code migrations, or identifier renaming across projects with multiple files and directories.
Unlike simpler tools like sed or sd, repren handles both content replacement and file/directory renaming in a single operation with case preservation and robust safety features, making complex refactoring tasks safer and more efficient.
Power rename/refactor tool (now with Claude Code skill support!)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows swapping terms like 'foo' and 'bar' in one operation without intermediate renames, as highlighted in the comparison table versus tools like sed.
Can rename both file contents and directory structures based on patterns, creating directories as needed, a feature missing in alternatives like sd or fastmod.
Preserves case conventions such as camelCase and snake_case when renaming identifiers, reducing manual correction for large codebases.
Includes dry-run mode, atomic file operations, and automatic .orig backups to prevent data loss, prioritizing correctness over speed as stated in the philosophy.
Provides JSON output format and self-installable Claude Code skills, making it ideal for AI-assisted refactoring with machine-parseable results.
Operates purely on text patterns, so it may incorrectly rename strings in comments or literals, unlike AST-based tools like ast-grep that understand code structure.
Requires Python 3.10+ and may be slower than compiled Rust tools like sd for simple replacements, as the README admits it prioritizes safety over speed.
Pattern files require tab separators and careful escaping of special characters, which can be error-prone for users unfamiliar with regular expressions.