🍺 BREW Explorer

← all formulae

fastmod

brew install fastmod v0.4.4 Apache-2.0

Fast, partial replacement for codemod (find/replace tool for programmers)

42
30-day installs · #5056
133
90-day · #4950
445
365-day · #5368
1.9k
★ GitHub stars · updated 4mo ago

Build dependencies

GitHub topics

cli command-line command-line-tool find-and-replace replace rust

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Fast, partial replacement for codemod (find/replace tool for programmers)",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:37:31+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "fastmod",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-04-14T20:07:28Z",
  "github_readme_excerpt": "# fastmod\n`fastmod` is a fast partial replacement for\n[codemod](https://github.com/facebook/codemod). Like `codemod`, it is\na tool to assist you with large-scale codebase refactors, and it\nsupports most of `codemod`\u0027s options. `fastmod`\u0027s major philosophical\ndifference from `codemod` is that it is focused on improving the use\ncase \"I want to use interactive mode to make sure my regex is correct,\nand then I want to apply the regex everywhere\". For this use case, it\noffers much better performance than `codemod`. Accordingly, `fastmod`\ndoes not support `codemod`\u0027s `--start`, `--end`, or `--count` options,\nnor does it support anything like `codemod`\u0027s Python API.\n\n## Examples\n\nLet\u0027s say you\u0027re deprecating your use of the `\u003cfont\u003e` tag. From the\ncommand line, you might make progress by running:\n\n```\nfastmod -m -d /home/jrosenstein/www --extensions php,html \\\n    \u0027\u003cfont *color=\"?(.*?)\"?\u003e(.*?)\u003c/font\u003e\u0027 \\\n    \u0027\u003cspan style=\"color: ${1};\"\u003e${2}\u003c/span\u003e\u0027\n```\n\nFor each match of the regex, you\u0027ll be shown a colored diff and asked\nif you want to accept the change (the replacement of the `\u003cfont\u003e` tag\nwith a `\u003cspan\u003e` tag), reject it, or edit the line in question in your\n`$EDITOR` of choice.\n\nNOTE: Whereas `codemod` uses Python regexes, `fastmod` uses the Rust\n[regex](https://github.com/rust-lang/regex) crate, which supports a\nslightly different regex syntax and does not support look around or\nbackreferences. In particular, use `${1}` instead of `\\1` to get the\ncontents of the first capture group, and use `$$` to write a literal\n`$` in the replacement string. See the regex crate\u0027s\n[documentation](https://docs.rs/regex/#syntax) for details.\n\nA consequence of this syntax is that the use of single quotes instead\nof double quotes around the replacement text is important, because the\n`bash` shell itself cares about the `$` character in double-quoted\nstrings. If you must double-quote your input text, be careful to\nescape `$` characters properly!\n\n`fastmod` also offers a usability improvement ",
  "github_repo": "facebookincubator/fastmod",
  "github_stars": 1912,
  "github_topics": [
    "cli",
    "command-line",
    "command-line-tool",
    "find-and-replace",
    "replace",
    "rust"
  ],
  "homepage": "https://github.com/facebookincubator/fastmod",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 42,
  "installs_365d": 445,
  "installs_90d": 133,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Apache-2.0",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "fastmod",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 5056,
  "rank_365d": 5368,
  "rank_90d": 4950,
  "raw_hash": "70192071583462c8",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/f/fastmod.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "0.4.4",
  "versioned_formulae": [],
  "why_use_this": null
}