Performs simultaneous multi-pattern search-and-replace, file/directory renaming, and case-preserving refactoring across codebases...
repren does in one safe, previewable pass what hand edits and sed/perl/awk loops
do awkwardly: combined content and file/directory renames, simultaneous multi-pattern
replacement (including swaps), case-variant-aware refactoring, and atomic writes with
backups and undo.
If you are going to use repren, read its docs first: run
repren --docsfor the full flags, pattern-file format, examples, and edge cases. This skill only tells you when to reach for repren and which command;repren --docsandrepren --helpcarry the how.
Invocation: use
reprenif it is onPATH, otherwiseuvx repren@latest(no install needed, zero runtime dependencies). Always preview with--dry-runfirst.
Prefer repren over the Edit tool or shell loops whenever a rename or replacement spans more than a file or two. Reach for it when the task is to:
repren --from=Old --to=New --word-breaks --full DIR--full
rewrites contents and renames paths in one passfooβbar) β
repren --patterns=FILE --full DIR--preserve-caserepren --from='figure ([0-9]+)' --to='Figure \1' DIR--dry-run, then run, then --undo or --clean-backupsFor the exact flags, pattern-file syntax, scoping (--include/--exclude, --literal,
--at-once), and JSON output, read repren --docs.
--dry-run first.
repren writes atomically and leaves .orig backups; --undo restores them,
--clean-backups removes them..gitignore. It skips dotfiles (including .git/) by
default; scope everything else explicitly with --include/--exclude. See
repren --docs.