Find every call to a specific function across a large multi-language codebase in seconds
Automatically rename or restructure API calls when upgrading a library version
Create custom lint rules your team runs in CI to enforce consistent code style
Migrate a codebase from one logging library to another without manual find-and-replace
GritQL is a query language for finding and rewriting code across an entire codebase. The central idea is that you describe what you are looking for by writing something that looks like the actual code, with placeholder variables for the parts you want to match against anything. For example, putting console.log($msg) in backticks gives you a search that finds every console.log call regardless of what argument is passed. Adding => winston.log($msg) turns that search into an automatic replacement. The language is designed to replace the point where large coding projects typically outgrow simple text search and have to be replaced with complex codemod scripts. Writing a codemod normally requires learning how the language's abstract syntax tree (a technical internal representation of code structure) works, which is time-consuming and hard to read back later. GritQL lets you stay closer to the original source code syntax while still handling complex conditional rules through where clauses that narrow down which matches actually qualify. GritQL supports more than a dozen programming languages from a single tool: JavaScript and TypeScript, Python, JSON, Java, Terraform, Solidity, CSS, Markdown, YAML, Rust, Go, and SQL. Patterns can be saved to a configuration file and run as custom lint rules in a continuous integration pipeline using grit check. A standard library of over 200 reusable patterns is available, covering common refactoring tasks like updating API calls when a library changes its interface. The tool is written in Rust and is built for performance at scale, with the README citing repositories of over ten million lines as a target use case. It uses tree-sitter under the hood for parsing. Installation is a single curl command. The license is MIT.
← biomejs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.