Grit is a code search and transformation tool built around GritQL, a declarative query language for finding and modifying source code. Any code snippet works as a query, and metavariables such as $msg stand in for the parts that vary. A rule such as replacing console.log with winston.log can be applied from the command line or saved as a custom lint, with where clauses that exclude specific cases.
The engine is written in Rust and tuned for repositories beyond 10M lines. It rewrites languages from JavaScript, TypeScript and Python to Java, Go, Rust and Terraform, plus JSON, YAML, CSS, Markdown, Solidity and SQL. A module system gives access to over 200 standard patterns, and auto-fix rules are built in.
Engineering teams use it for large API and framework migrations, dependency upgrades with breaking changes, custom linting and code quality work. A free tier and a free trial are available.