GritQL, a Rust CLI for rewriting source code

GritQL is a powerful and declarative query language designed for searching and modifying source code. It allows users to start simply without needing to learn AST details, with any code snippet serving as a valid GritQL query. The language is optimized with Rust for scalability, capable of handling repositories with over 10 million lines of code. Users can leverage Grit’s built-in module system to reuse standard patterns or create their own. Additionally, GritQL enables users to rewrite code in various languages, and easily include auto-fix rules for faster remediation. The tool aims to simplify the process of conducting large-scale refactors and migrations, offering a middle ground between simple grep searches and writing full codemod programs. GritQL is written in Rust for optimal performance and is open for contributions under the MIT license.

https://github.com/getgrit/gritql

To top