fastmod
interactive codebase-wide find and replace
TLDR
Replace string in files
SYNOPSIS
fastmod [options] pattern replacement [paths...]
DESCRIPTION
fastmod performs fast, interactive codemod operations across files. It searches for patterns and offers interactive confirmation for replacements, making bulk code changes safer.
The tool combines the speed of ripgrep for searching with interactive review of changes. It's designed for large-scale refactoring in codebases.
PARAMETERS
-m, --multiline
Enable multiline regex matching.-i, --ignore-case
Case insensitive matching.--extensions exts
Filter by file extensions.--accept-all
Accept all replacements.--print-only
Show matches without changing.-d, --dir path
Search directory.--glob pattern
Include/exclude files.--hidden
Search hidden files.--fixed-strings
Treat pattern as literal.
CAVEATS
Regex syntax differs from some tools. Interactive mode requires terminal. Large replacements may need review. Backup recommended before bulk changes.
HISTORY
fastmod was developed at Facebook (Meta) as a tool for large-scale code modifications. It addresses the need for interactive, safe refactoring across massive codebases. Released as open source, it uses Rust for performance.
