fastmod
Fastmod is a command-line tool designed to quickly make bulk modifications to source code files. It is written in Rust and is optimized for speed, aiming to provide a significantly faster alternative to traditional search-and-replace tools like sed or awk.
Fastmod can handle complicated regular expressions and large codebases efficiently. It supports various modifiers and flags, allowing users to perform regex-based replacements, deletions, or insertions. It can also perform dry runs, providing a preview of the modifications before making any actual changes to the files.
One of the key advantages of using Fastmod is its performance. It uses multiple threads and intelligent algorithms to parallelize the processing, which results in significantly faster search and replace operations. This makes it ideal for handling large-scale codebases or when time is a crucial factor.
With its ease of use, performance benefits, and support for complex regex operations, Fastmod is a valuable tool for developers and engineers who frequently need to make bulk modifications to their source code files.
List of commands for fastmod:
-
fastmod:tldr:0ac48 fastmod: Replace for an exact string without prompt for a confirmation, printing changed files.$ fastmod --accept-all --print-changed-files --fixed-strings ${exact_string} ${replacement}try on your machineexplain this command
-
fastmod:tldr:2033d fastmod: Replace for an exact string without prompt for a confirmation (disables regular expressions).$ fastmod --accept-all --fixed-strings ${exact_string} ${replacement}try on your machineexplain this command
-
fastmod:tldr:378ec fastmod: Replace for an exact string in .js or .json files.$ fastmod --fixed-strings ${exact_string} ${replacement} --extensions ${json,js}try on your machineexplain this command
-
fastmod:tldr:93ee4 fastmod: Replace a regex pattern in all files of the current directory, ignoring files on .ignore and .gitignore.$ fastmod ${regex_pattern} ${replacement}try on your machineexplain this command
-
fastmod:tldr:9ab27 fastmod: Replace a regex pattern in a specific directory in files filtered with a case-insensitive glob pattern.$ fastmod ${regex} ${replacement} --dir ${path-to-directory} --iglob ${'**-*-{js,json}'}try on your machineexplain this command