#5757th of 67 in Code review and testing
gritql
Query language for searching and rewriting source code with tree-sitter
- Stars
- 4.6k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Mar 2026
- Language
- Rust
4,460 on 27 Apr 20264,630 on 23 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
GritQL is a declarative query language and Rust CLI (`grit`) for searching and rewriting code. Any code snippet in backticks is a valid query, with `$metavariables` as holes, `=>` for rewrites and `where` clauses for conditions. Patterns can be saved in `.grit/grit.yaml` and enforced as custom lints with `grit check`. It has no AI model features, so it fits this list only loosely.
Who it is for: Engineers running large codemods, migrations and custom lint rules
Strengths
- Any code snippet is a valid query, so no AST knowledge is needed to start
- One query language targets JavaScript/TypeScript, Python, Java, Go, Rust, Terraform, SQL and more
- Rust implementation; README claims it scales to 10M+ line repositories
- Reusable patterns, 200+ in the standard library, and `grit check` for CI lints
Weaknesses
- Complex rewrites need a custom query language beyond the snippet basics
- No LLM features, so it does not match the AI focus of this list
- README documents install only as a `curl | bash` script
- README links point to the getgrit org, not the biomejs repository
What it needs
- no GPU
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Also in Code review and testing
See all 67| Rank | Project | Score |
|---|---|---|
| #55 | truecourseGenerates Playwright tests from product docs to find where docs and product disagree | 58 out of 100 |
| #56 | eslint-plugin-reactReact-specific lint rules for ESLint, covering JSX style and component correctness | 57 out of 100 |
| #58 | apiautoBrowser-based HTTP API tester with generated docs, code and regression runs | 51 out of 100 |
| #59 | go-criticExtensible Go linter with about 100 checks for bugs, performance and style | 50 out of 100 |
| #60 | ai-codereview-gitlabLLM reviewer for GitLab merge requests and pushes, with chat notifications | 46 out of 100 |