{"repo":"biomejs/gritql","free":true,"listed":false,"github":"https://github.com/biomejs/gritql","clone":"git clone https://github.com/biomejs/gritql.git","description":"GritQL is a query language for searching, linting, and modifying code.","language":"Rust","stars":4574,"topics":["ast","codemod","javascript","linter","refactoring","rust","search","tree-sitter"],"license":"MIT","category":"dev-tools","readme_excerpt":"Playground Tutorial Docs GritQL is a declarative query language for searching and modifying source code. - 📖 Start simply without learning AST details: any code snippet is a valid GritQL query - ⚡️ Use Rust and query optimization to scale up to 10M+ line repositories - 📦 Use Grit's built-in module system to reuse 200+ standard patterns or share your own - ♻️ Once you learn GritQL, you can use it to rewrite any target language: JavaScript/TypeScript, Python, JSON, Java, Terraform, Solidity, CSS, Markdown, YAML, Rust, Go, or SQL - 🔧 GritQL makes it easy to include auto-fix rules for faster remediation Getting started Read the documentation, interactive tutorial, or run grit --help . Installation Install the Grit CLI: Usage Search for all your console.log calls by putting the desired pattern in backticks: Replace console.log with winston.log , using = to create rewrites: Save the pattern to a grit.yaml file and exclude test cases in a where clause: Run grit check to enforce your patterns as custom lints. Examples Remove all console.log calls, unless they are inside a try-catch block Replace a method call with a new method call More examples Many more examples can be found in the GritQL standard library. Patterns can be combined to create complex queries, including large refactors. Why GritQL? GritQL comes from our experiences with conducting large scale refactors and migrations. Usually, migrations start with exploratory work to figure out the scope of the problem—often using","default_branch":null,"files":null,"tree":[],"storefront":"/r/biomejs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/biomejs/gritql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}