A code rewrite tool for structural search and replace that supports ~every language.
Comby is a code rewrite tool for structural search and replace that supports approximately every programming language. It uses OCaml as its implementation language and includes vendored dependencies like CamlZip for compression handling and Patdiff for colored diff output. The tool addresses the limitations of regex-based approaches like sed by enabling pattern matching that understands language syntax, allowing users to match and rewrite nested expressions, comments, and strings across languages including C, Go, Java, JavaScript, PHP, Python, Reason, Rust, Swift, and TypeScript. Comby is distributed under the Apache 2.0 license and can be installed via package managers like Homebrew or built from source using OCaml's opam package manager.