The language was developed from experiences with large scale refactors and migrations, aiming to provide a powerful middle ground for codemod programs. It allows for easy exploratory analysis, incremental complexity addition, pattern reuse, and high performance due to being written in Rust. GritQL uses tree-sitter for all language parsers and benefits from the Rust ecosystem. It is released under the MIT license and welcomes contributions.
Key takeaways:
- GritQL is a declarative query language for searching and modifying source code, designed to scale up to 10M+ line repositories.
- It allows you to start simply without learning AST details and includes auto-fix rules for faster remediation.
- GritQL can be used to rewrite any target language including JavaScript/TypeScript, Python, JSON, Java, Terraform, Solidity, CSS, Markdown, YAML, Rust, Go, or SQL.
- GritQL is designed for easy exploratory analysis, incremental complexity addition, query reuse, and high performance, making it a powerful tool for large scale refactors and migrations.