srgn

Precise code and text search-and-replace tool with regex support

brewmacoslinux
Try with needOr install directly
Source

About

Code surgeon for precise text and code transplantation

Commands

srgn

Examples

Replace all occurrences of a function name in files$ srgn 'oldFunction' 'newFunction' src/
Search and replace with regex pattern matching$ srgn 'const\s+(\w+)\s*=' 'let $1 =' --regex src/
Preview changes before applying them$ srgn 'TODO' 'FIXME' --dry-run app.js